runatlantis / atlantis

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

add optional toggle for specific prometheus metrics #4662

Open igaskin opened 2 weeks ago

igaskin commented 2 weeks ago

Community Note


Describe the user story

As an Atlantis admin, I would like to control which metrics are exposed on the /metrics prometheus endpoint.

Describe the solution you'd like

Have an option to the repo config to turn on specific metrics. This would reduce the size of the page in /metrics and also save on cost for downstream metrics storage.

example set of metrics to expose

                  "atlantis_project_plan_execution_time",
                  "atlantis_project_apply_execution_time",
                  "atlantis_project_plan_execution_success",
                  "atlantis_project_apply_execution_success",
                  "atlantis_project_plan_execution_success"

Describe the drawbacks of your solution

May limit discoverability of new metrics when added.

Describe alternatives you've considered

Filtering for specific metrics at the ingestion level.