fix: only collect prometheus database metrics when explicitly enabled (#8045)

* fix: only collect prometheus database metrics when explicitly enabled

* add missing test

* de-duplicate wrapping
This commit is contained in:
Cian Johnston
2023-06-15 12:34:16 +01:00
committed by GitHub
parent 3f81f38fcc
commit 6e598234b6
14 changed files with 158 additions and 58 deletions
+11
View File
@@ -565,6 +565,17 @@ The bind address to serve prometheus metrics.
Collect agent stats (may increase charges for metrics storage).
### --prometheus-collect-db-metrics
| | |
| ----------- | -------------------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_PROMETHEUS_COLLECT_DB_METRICS</code> |
| YAML | <code>introspection.prometheus.collect_db_metrics</code> |
| Default | <code>false</code> |
Collect database metrics (may increase charges for metrics storage).
### --prometheus-enable
| | |