OpenTelemetry
To enable the OpenTelemetry metrics:
File (YAML)
metrics:
otlp: {}
File (TOML)
[metrics]
[metrics.otlp]
CLI
--metrics.otlp=true
Default protocol
The OpenTelemetry exporter will export metrics to the collector using HTTP by default to https://localhost:4318/v1/metrics, see the gRPC Section to use gRPC.
addEntryPointsLabels
Optional, Default=true
Enable metrics on entry points.
File (YAML)
metrics:
otlp:
addEntryPointsLabels: true
File (TOML)
[metrics]
[metrics.otlp]
addEntryPointsLabels = true
CLI
--metrics.otlp.addEntryPointsLabels=true
addRoutersLabels
Optional, Default=false
Enable metrics on routers.
File (YAML)
metrics:
otlp:
addRoutersLabels: true
File (TOML)
[metrics]
[metrics.otlp]
addRoutersLabels = true
CLI
--metrics.otlp.addRoutersLabels=true
addServicesLabels
Optional, Default=true
Enable metrics on services.
File (YAML)
metrics:
otlp:
addServicesLabels: true
File (TOML)
[metrics]
[metrics.otlp]
addServicesLabels = true
CLI
--metrics.otlp.addServicesLabels=true
explicitBoundaries
Optional, Default=”.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10”
Explicit boundaries for Histogram data points.
File (YAML)
metrics:
otlp:
explicitBoundaries:
- 0.1
- 0.3
- 1.2
- 5.0
File (TOML)
[metrics]
[metrics.otlp]
explicitBoundaries = [0.1,0.3,1.2,5.0]
CLI
--metrics.otlp.explicitBoundaries=0.1,0.3,1.2,5.0
pushInterval
Optional, Default=10s
Interval at which metrics are sent to the OpenTelemetry Collector.
File (YAML)
metrics:
otlp:
pushInterval: 10s
File (TOML)
[metrics]
[metrics.otlp]
pushInterval = "10s"
CLI
--metrics.otlp.pushInterval=10s
serviceName
Optional, Default=”traefik”
OTEL service name to use.
File (YAML)
metrics:
otlp:
serviceName: name
File (TOML)
[metrics]
[metrics.otlp]
serviceName = "name"
CLI
--metrics.otlp.serviceName=name
HTTP configuration
Optional
This instructs the exporter to send the metrics to the OpenTelemetry Collector using HTTP.
File (YAML)
metrics:
otlp:
http: {}
File (TOML)
[metrics]
[metrics.otlp.http]
CLI
--metrics.otlp.http=true
endpoint
Required, Default=”http://localhost:4318/v1/metrics“, Format=”<scheme>://<host>:<port><path>
“
URL of the OpenTelemetry Collector to send metrics to.
File (YAML)
metrics:
otlp:
http:
endpoint: http://localhost:4318/v1/metrics
File (TOML)
[metrics]
[metrics.otlp.http]
endpoint = "http://localhost:4318/v1/metrics"
CLI
--metrics.otlp.http.endpoint=http://localhost:4318/v1/metrics
headers
Optional, Default={}
Additional headers sent with metrics by the exporter to the OpenTelemetry Collector.
File (YAML)
metrics:
otlp:
http:
headers:
foo: bar
baz: buz
File (TOML)
[metrics]
[metrics.otlp.http.headers]
foo = "bar"
baz = "buz"
CLI
--metrics.otlp.http.headers.foo=bar --metrics.otlp.http.headers.baz=buz
tls
Optional
Defines the Client TLS configuration used by the exporter to send metrics to the OpenTelemetry Collector.
ca
Optional
ca
is the path to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle.
File (YAML)
metrics:
otlp:
http:
tls:
ca: path/to/ca.crt
File (TOML)
[metrics.otlp.http.tls]
ca = "path/to/ca.crt"
CLI
--metrics.otlp.http.tls.ca=path/to/ca.crt
cert
Optional
cert
is the path to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key
option is required.
File (YAML)
metrics:
otlp:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
File (TOML)
[metrics.otlp.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
CLI
--metrics.otlp.http.tls.cert=path/to/foo.cert
--metrics.otlp.http.tls.key=path/to/foo.key
key
Optional
key
is the path to the private key used for the secure connection to the OpenTelemetry Collector. When using this option, setting the cert
option is required.
File (YAML)
metrics:
otlp:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
File (TOML)
[metrics.otlp.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
CLI
--metrics.otlp.http.tls.cert=path/to/foo.cert
--metrics.otlp.http.tls.key=path/to/foo.key
insecureSkipVerify
Optional, Default=false
If insecureSkipVerify
is true
, the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers.
File (YAML)
metrics:
otlp:
http:
tls:
insecureSkipVerify: true
File (TOML)
[metrics.otlp.http.tls]
insecureSkipVerify = true
CLI
--metrics.otlp.http.tls.insecureSkipVerify=true
gRPC configuration
Optional
This instructs the exporter to send metrics to the OpenTelemetry Collector using gRPC.
File (YAML)
metrics:
otlp:
grpc: {}
File (TOML)
[metrics]
[metrics.otlp.grpc]
CLI
--metrics.otlp.grpc=true
endpoint
Required, Default=”localhost:4317”, Format=”<host>:<port>
“
Address of the OpenTelemetry Collector to send metrics to.
File (YAML)
metrics:
otlp:
grpc:
endpoint: localhost:4317
File (TOML)
[metrics]
[metrics.otlp.grpc]
endpoint = "localhost:4317"
CLI
--metrics.otlp.grpc.endpoint=localhost:4317
insecure
Optional, Default=false
Allows exporter to send metrics to the OpenTelemetry Collector without using a secured protocol.
File (YAML)
metrics:
otlp:
grpc:
insecure: true
File (TOML)
[metrics]
[metrics.otlp.grpc]
insecure = true
CLI
--metrics.otlp.grpc.insecure=true
headers
Optional, Default={}
Additional headers sent with metrics by the exporter to the OpenTelemetry Collector.
File (YAML)
metrics:
otlp:
grpc:
headers:
foo: bar
baz: buz
File (TOML)
[metrics]
[metrics.otlp.grpc.headers]
foo = "bar"
baz = "buz"
CLI
--metrics.otlp.grpc.headers.foo=bar --metrics.otlp.grpc.headers.baz=buz
tls
Optional
Defines the Client TLS configuration used by the exporter to send metrics to the OpenTelemetry Collector.
ca
Optional
ca
is the path to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle.
File (YAML)
metrics:
otlp:
grpc:
tls:
ca: path/to/ca.crt
File (TOML)
[metrics.otlp.grpc.tls]
ca = "path/to/ca.crt"
CLI
--metrics.otlp.grpc.tls.ca=path/to/ca.crt
cert
Optional
cert
is the path to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key
option is required.
File (YAML)
metrics:
otlp:
grpc:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
File (TOML)
[metrics.otlp.grpc.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
CLI
--metrics.otlp.grpc.tls.cert=path/to/foo.cert
--metrics.otlp.grpc.tls.key=path/to/foo.key
key
Optional
key
is the path to the private key used for the secure connection to the OpenTelemetry Collector. When using this option, setting the cert
option is required.
File (YAML)
metrics:
otlp:
grpc:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
File (TOML)
[metrics.otlp.grpc.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
CLI
--metrics.otlp.grpc.tls.cert=path/to/foo.cert
--metrics.otlp.grpc.tls.key=path/to/foo.key
insecureSkipVerify
Optional, Default=false
If insecureSkipVerify
is true
, the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers.
File (YAML)
metrics:
otlp:
grpc:
tls:
insecureSkipVerify: true
File (TOML)
[metrics.otlp.grpc.tls]
insecureSkipVerify = true
CLI
--metrics.otlp.grpc.tls.insecureSkipVerify=true