OpenTelemetry¶
To enable the OpenTelemetry metrics:
metrics:
otlp: {}[metrics]
[metrics.otlp]--metrics.otlp=trueDefault 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.
metrics:
otlp:
addEntryPointsLabels: true[metrics]
[metrics.otlp]
addEntryPointsLabels = true--metrics.otlp.addEntryPointsLabels=trueaddRoutersLabels¶
Optional, Default=false
Enable metrics on routers.
metrics:
otlp:
addRoutersLabels: true[metrics]
[metrics.otlp]
addRoutersLabels = true--metrics.otlp.addRoutersLabels=trueaddServicesLabels¶
Optional, Default=true
Enable metrics on services.
metrics:
otlp:
addServicesLabels: true[metrics]
[metrics.otlp]
addServicesLabels = true--metrics.otlp.addServicesLabels=trueexplicitBoundaries¶
Optional, Default=".005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10"
Explicit boundaries for Histogram data points.
metrics:
otlp:
explicitBoundaries:
- 0.1
- 0.3
- 1.2
- 5.0[metrics]
[metrics.otlp]
explicitBoundaries = [0.1,0.3,1.2,5.0]--metrics.otlp.explicitBoundaries=0.1,0.3,1.2,5.0pushInterval¶
Optional, Default=10s
Interval at which metrics are sent to the OpenTelemetry Collector.
metrics:
otlp:
pushInterval: 10s[metrics]
[metrics.otlp]
pushInterval = "10s"--metrics.otlp.pushInterval=10sserviceName¶
Optional, Default="traefik"
OTEL service name to use.
metrics:
otlp:
serviceName: name[metrics]
[metrics.otlp]
serviceName = "name"--metrics.otlp.serviceName=nameHTTP configuration¶
Optional
This instructs the exporter to send the metrics to the OpenTelemetry Collector using HTTP.
metrics:
otlp:
http: {}[metrics]
[metrics.otlp.http]--metrics.otlp.http=trueendpoint¶
Required, Default="http://localhost:4318/v1/metrics", Format="<scheme>://<host>:<port><path>"
URL of the OpenTelemetry Collector to send metrics to.
metrics:
otlp:
http:
endpoint: http://localhost:4318/v1/metrics[metrics]
[metrics.otlp.http]
endpoint = "http://localhost:4318/v1/metrics"--metrics.otlp.http.endpoint=http://localhost:4318/v1/metricsheaders¶
Optional, Default={}
Additional headers sent with metrics by the exporter to the OpenTelemetry Collector.
metrics:
otlp:
http:
headers:
foo: bar
baz: buz[metrics]
[metrics.otlp.http.headers]
foo = "bar"
baz = "buz"--metrics.otlp.http.headers.foo=bar --metrics.otlp.http.headers.baz=buztls¶
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.
metrics:
otlp:
http:
tls:
ca: path/to/ca.crt[metrics.otlp.http.tls]
ca = "path/to/ca.crt"--metrics.otlp.http.tls.ca=path/to/ca.crtcert¶
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.
metrics:
otlp:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key[metrics.otlp.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"--metrics.otlp.http.tls.cert=path/to/foo.cert
--metrics.otlp.http.tls.key=path/to/foo.keykey¶
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.
metrics:
otlp:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key[metrics.otlp.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"--metrics.otlp.http.tls.cert=path/to/foo.cert
--metrics.otlp.http.tls.key=path/to/foo.keyinsecureSkipVerify¶
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.
metrics:
otlp:
http:
tls:
insecureSkipVerify: true[metrics.otlp.http.tls]
insecureSkipVerify = true--metrics.otlp.http.tls.insecureSkipVerify=truegRPC configuration¶
Optional
This instructs the exporter to send metrics to the OpenTelemetry Collector using gRPC.
metrics:
otlp:
grpc: {}[metrics]
[metrics.otlp.grpc]--metrics.otlp.grpc=trueendpoint¶
Required, Default="localhost:4317", Format="<host>:<port>"
Address of the OpenTelemetry Collector to send metrics to.
metrics:
otlp:
grpc:
endpoint: localhost:4317[metrics]
[metrics.otlp.grpc]
endpoint = "localhost:4317"--metrics.otlp.grpc.endpoint=localhost:4317insecure¶
Optional, Default=false
Allows exporter to send metrics to the OpenTelemetry Collector without using a secured protocol.
metrics:
otlp:
grpc:
insecure: true[metrics]
[metrics.otlp.grpc]
insecure = true--metrics.otlp.grpc.insecure=trueheaders¶
Optional, Default={}
Additional headers sent with metrics by the exporter to the OpenTelemetry Collector.
metrics:
otlp:
grpc:
headers:
foo: bar
baz: buz[metrics]
[metrics.otlp.grpc.headers]
foo = "bar"
baz = "buz"--metrics.otlp.grpc.headers.foo=bar --metrics.otlp.grpc.headers.baz=buztls¶
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.
metrics:
otlp:
grpc:
tls:
ca: path/to/ca.crt[metrics.otlp.grpc.tls]
ca = "path/to/ca.crt"--metrics.otlp.grpc.tls.ca=path/to/ca.crtcert¶
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.
metrics:
otlp:
grpc:
tls:
cert: path/to/foo.cert
key: path/to/foo.key[metrics.otlp.grpc.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"--metrics.otlp.grpc.tls.cert=path/to/foo.cert
--metrics.otlp.grpc.tls.key=path/to/foo.keykey¶
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.
metrics:
otlp:
grpc:
tls:
cert: path/to/foo.cert
key: path/to/foo.key[metrics.otlp.grpc.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"--metrics.otlp.grpc.tls.cert=path/to/foo.cert
--metrics.otlp.grpc.tls.key=path/to/foo.keyinsecureSkipVerify¶
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.
metrics:
otlp:
grpc:
tls:
insecureSkipVerify: true[metrics.otlp.grpc.tls]
insecureSkipVerify = true--metrics.otlp.grpc.tls.insecureSkipVerify=true