runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.87k stars 1.06k forks source link

Recommended metrics appear to be missing from `/metrics` endpoint #3961

Open cblkwell opened 1 year ago

cblkwell commented 1 year ago

Community Note


Overview of the Issue

The docs at https://www.runatlantis.io/docs/stats.html#available-metrics have a list of important metrics to track for Atlantis. However, when looking at the /metrics endpoint on our Atlantis hosts, none of those metrics appear to be exposed. We see plenty of other metrics, but none of the ones in the table listed as important.

Reproduction Steps

It should be pretty easy to verify this; I ran a simple curl | grep command to look for it (domain changed to protect the innocent):

$ curl https://atlantis.example.com/metrics |grep atlantis_cmd_autoplan_execution_error
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  283k    0  283k    0     0   877k      0 --:--:-- --:--:-- --:--:--  898k
$

As you can see, the request gets a great deal of other metrics, just not that one.

Logs

Environment details

We are running v0.26 with the terraform-aws-atlantis Terraform module on Fargate with ephemeral storage.

Server config:

repos:
- id: /.*/
  repo_config_file: atlantis-nonprod.yaml
  apply_requirements: []
  allowed_overrides: [apply_requirements, workflow]
  allowed_custom_workflows: true
  delete_source_branch_on_merge: true
metrics:
  prometheus:
    endpoint: "/metrics"

Repo config (name of project changed to protect the innocent):

version: 3
projects:
  - name: foo-bar
    dir: ./foo/bar
Jeskz0rd commented 7 months ago

Same on v0.27.1