Add prometheus metric requests_total with headers

Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
Romain 2023-03-20 18:06:07 +01:00 committed by GitHub
parent 4bc2305ed3
commit c823879097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 295 additions and 90 deletions

View file

@ -354,6 +354,9 @@ Buckets for latency metrics. (Default: ```0.100000, 0.300000, 1.200000, 5.000000
`--metrics.prometheus.entrypoint`:
EntryPoint (Default: ```traefik```)
`--metrics.prometheus.headerlabels.<name>`:
Defines the extra labels for the requests_total metrics, and for each of them, the request header containing the value for this label.
`--metrics.prometheus.manualrouting`:
Manual routing (Default: ```false```)

View file

@ -354,6 +354,9 @@ Buckets for latency metrics. (Default: ```0.100000, 0.300000, 1.200000, 5.000000
`TRAEFIK_METRICS_PROMETHEUS_ENTRYPOINT`:
EntryPoint (Default: ```traefik```)
`TRAEFIK_METRICS_PROMETHEUS_HEADERLABELS_<NAME>`:
Defines the extra labels for the requests_total metrics, and for each of them, the request header containing the value for this label.
`TRAEFIK_METRICS_PROMETHEUS_MANUALROUTING`:
Manual routing (Default: ```false```)

View file

@ -272,6 +272,9 @@
addServicesLabels = true
entryPoint = "foobar"
manualRouting = true
[metrics.prometheus.headerLabels]
label1 = "foobar"
label2 = "foobar"
[metrics.datadog]
address = "foobar"
pushInterval = "42s"

View file

@ -298,6 +298,9 @@ metrics:
addServicesLabels: true
entryPoint: foobar
manualRouting: true
headerLabels:
label1: foobar
label2: foobar
datadog:
address: foobar
pushInterval: 42s