mirror of
https://github.com/prometheus/prometheus.git
synced 2026-04-07 02:05:17 -04:00
Building off config-specific Prometheus refresh metrics from an earlier PR (https://github.com/prometheus/prometheus/pull/17138), this deletes refresh metrics like `prometheus_sd_refresh_duration_seconds` and `prometheus_sd_refresh_failures_total` when the underlying scrape job configuration is removed on reload. This reduces un-needed cardinality from scrape job specific metrics while still preserving metrics that indicate overall health of a service discovery engine. For example, `prometheus_sd_refresh_failures_total{config="linode-servers",mechanism="linode"} 1` will no longer be exported by Prometheus when the `linode-servers` scrape job for the Linode service provider is removed. The generic, service discovery specific `prometheus_sd_linode_failures_total` metric will persist however. * fix: add targetsMtx lock for targets access * test: validate refresh/discover metrics are gone * ref: combine sdMetrics and refreshMetrics Good idea from @bboreham to combine sdMetrics and refreshMetrics! They're always passed around together and don't have much of a reason not to be combined. mechanismMetrics makes it clear what kind of metrics this is used for (service discovery mechanisms). --------- Signed-off-by: Will Bollock <wbollock@linode.com> |
||
|---|---|---|
| .. | ||
| custom-sd | ||
| kubernetes-rabbitmq | ||
| remote_storage | ||
| Makefile | ||
| prometheus-agent.yml | ||
| prometheus-digitalocean.yml | ||
| prometheus-docker.yml | ||
| prometheus-dockerswarm.yml | ||
| prometheus-eureka.yml | ||
| prometheus-hetzner.yml | ||
| prometheus-ionos.yml | ||
| prometheus-kubernetes.yml | ||
| prometheus-linode.yml | ||
| prometheus-marathon.yml | ||
| prometheus-nomad.yml | ||
| prometheus-otlp.yml | ||
| prometheus-outscale.yml | ||
| prometheus-ovhcloud.yml | ||
| prometheus-puppetdb.yml | ||
| prometheus-scaleway.yml | ||
| prometheus-stackit.yml | ||
| prometheus-uyuni.yml | ||
| prometheus-vultr.yml | ||
| prometheus.yml | ||
| promtool-http-config-file.yml | ||
| rbac-setup.yml | ||
| web-config.yml | ||