OpenTelemetry Logs and Access Logs

Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
Romain 2024-12-06 14:50:04 +01:00 committed by GitHub
parent 33c1d700c0
commit 826a2b74aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 2297 additions and 475 deletions

View file

@ -39,6 +39,60 @@ Keep access logs with status codes in the specified range.
`--accesslog.format`:
Access log format: json | common (Default: ```common```)
`--accesslog.otlp`:
Settings for OpenTelemetry. (Default: ```false```)
`--accesslog.otlp.grpc`:
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
`--accesslog.otlp.grpc.endpoint`:
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
`--accesslog.otlp.grpc.headers.<name>`:
Headers sent with payload.
`--accesslog.otlp.grpc.insecure`:
Disables client transport security for the exporter. (Default: ```false```)
`--accesslog.otlp.grpc.tls.ca`:
TLS CA
`--accesslog.otlp.grpc.tls.cert`:
TLS cert
`--accesslog.otlp.grpc.tls.insecureskipverify`:
TLS insecure skip verify (Default: ```false```)
`--accesslog.otlp.grpc.tls.key`:
TLS key
`--accesslog.otlp.http`:
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
`--accesslog.otlp.http.endpoint`:
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
`--accesslog.otlp.http.headers.<name>`:
Headers sent with payload.
`--accesslog.otlp.http.tls.ca`:
TLS CA
`--accesslog.otlp.http.tls.cert`:
TLS cert
`--accesslog.otlp.http.tls.insecureskipverify`:
TLS insecure skip verify (Default: ```false```)
`--accesslog.otlp.http.tls.key`:
TLS key
`--accesslog.otlp.resourceattributes.<name>`:
Defines additional resource attributes (key:value).
`--accesslog.otlp.servicename`:
Set the name for this service. (Default: ```traefik```)
`--api`:
Enable api/dashboard. (Default: ```false```)
@ -333,6 +387,60 @@ Maximum size in megabytes of the log file before it gets rotated. (Default: ```0
`--log.nocolor`:
When using the 'common' format, disables the colorized output. (Default: ```false```)
`--log.otlp`:
Settings for OpenTelemetry. (Default: ```false```)
`--log.otlp.grpc`:
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
`--log.otlp.grpc.endpoint`:
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
`--log.otlp.grpc.headers.<name>`:
Headers sent with payload.
`--log.otlp.grpc.insecure`:
Disables client transport security for the exporter. (Default: ```false```)
`--log.otlp.grpc.tls.ca`:
TLS CA
`--log.otlp.grpc.tls.cert`:
TLS cert
`--log.otlp.grpc.tls.insecureskipverify`:
TLS insecure skip verify (Default: ```false```)
`--log.otlp.grpc.tls.key`:
TLS key
`--log.otlp.http`:
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
`--log.otlp.http.endpoint`:
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
`--log.otlp.http.headers.<name>`:
Headers sent with payload.
`--log.otlp.http.tls.ca`:
TLS CA
`--log.otlp.http.tls.cert`:
TLS cert
`--log.otlp.http.tls.insecureskipverify`:
TLS insecure skip verify (Default: ```false```)
`--log.otlp.http.tls.key`:
TLS key
`--log.otlp.resourceattributes.<name>`:
Defines additional resource attributes (key:value).
`--log.otlp.servicename`:
Set the name for this service. (Default: ```traefik```)
`--metrics.addinternals`:
Enables metrics for internal services (ping, dashboard, etc...). (Default: ```false```)
@ -1138,7 +1246,7 @@ Defines the allowed SPIFFE IDs (takes precedence over the SPIFFE TrustDomain).
Defines the allowed SPIFFE trust domain.
`--tracing`:
OpenTracing configuration. (Default: ```false```)
Tracing configuration. (Default: ```false```)
`--tracing.addinternals`:
Enables tracing for internal services (ping, dashboard, etc...). (Default: ```false```)
@ -1150,7 +1258,7 @@ Request headers to add as attributes for server and client spans.
Response headers to add as attributes for server and client spans.
`--tracing.globalattributes.<name>`:
Defines additional attributes (key:value) on all spans.
(Deprecated) Defines additional resource attributes (key:value).
`--tracing.otlp`:
Settings for OpenTelemetry. (Default: ```false```)
@ -1200,6 +1308,9 @@ TLS insecure skip verify (Default: ```false```)
`--tracing.otlp.http.tls.key`:
TLS key
`--tracing.resourceattributes.<name>`:
Defines additional resource attributes (key:value).
`--tracing.safequeryparams`:
Query params to not redact.
@ -1207,4 +1318,4 @@ Query params to not redact.
Sets the rate between 0.0 and 1.0 of requests to trace. (Default: ```1.000000```)
`--tracing.servicename`:
Set the name for this service. (Default: ```traefik```)
Sets the name for this service. (Default: ```traefik```)

View file

@ -39,6 +39,60 @@ Keep access logs with status codes in the specified range.
`TRAEFIK_ACCESSLOG_FORMAT`:
Access log format: json | common (Default: ```common```)
`TRAEFIK_ACCESSLOG_OTLP`:
Settings for OpenTelemetry. (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_GRPC`:
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_GRPC_ENDPOINT`:
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
`TRAEFIK_ACCESSLOG_OTLP_GRPC_HEADERS_<NAME>`:
Headers sent with payload.
`TRAEFIK_ACCESSLOG_OTLP_GRPC_INSECURE`:
Disables client transport security for the exporter. (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_GRPC_TLS_CA`:
TLS CA
`TRAEFIK_ACCESSLOG_OTLP_GRPC_TLS_CERT`:
TLS cert
`TRAEFIK_ACCESSLOG_OTLP_GRPC_TLS_INSECURESKIPVERIFY`:
TLS insecure skip verify (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_GRPC_TLS_KEY`:
TLS key
`TRAEFIK_ACCESSLOG_OTLP_HTTP`:
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_HTTP_ENDPOINT`:
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
`TRAEFIK_ACCESSLOG_OTLP_HTTP_HEADERS_<NAME>`:
Headers sent with payload.
`TRAEFIK_ACCESSLOG_OTLP_HTTP_TLS_CA`:
TLS CA
`TRAEFIK_ACCESSLOG_OTLP_HTTP_TLS_CERT`:
TLS cert
`TRAEFIK_ACCESSLOG_OTLP_HTTP_TLS_INSECURESKIPVERIFY`:
TLS insecure skip verify (Default: ```false```)
`TRAEFIK_ACCESSLOG_OTLP_HTTP_TLS_KEY`:
TLS key
`TRAEFIK_ACCESSLOG_OTLP_RESOURCEATTRIBUTES_<NAME>`:
Defines additional resource attributes (key:value).
`TRAEFIK_ACCESSLOG_OTLP_SERVICENAME`:
Set the name for this service. (Default: ```traefik```)
`TRAEFIK_API`:
Enable api/dashboard. (Default: ```false```)
@ -333,6 +387,60 @@ Maximum size in megabytes of the log file before it gets rotated. (Default: ```0
`TRAEFIK_LOG_NOCOLOR`:
When using the 'common' format, disables the colorized output. (Default: ```false```)
`TRAEFIK_LOG_OTLP`:
Settings for OpenTelemetry. (Default: ```false```)
`TRAEFIK_LOG_OTLP_GRPC`:
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
`TRAEFIK_LOG_OTLP_GRPC_ENDPOINT`:
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
`TRAEFIK_LOG_OTLP_GRPC_HEADERS_<NAME>`:
Headers sent with payload.
`TRAEFIK_LOG_OTLP_GRPC_INSECURE`:
Disables client transport security for the exporter. (Default: ```false```)
`TRAEFIK_LOG_OTLP_GRPC_TLS_CA`:
TLS CA
`TRAEFIK_LOG_OTLP_GRPC_TLS_CERT`:
TLS cert
`TRAEFIK_LOG_OTLP_GRPC_TLS_INSECURESKIPVERIFY`:
TLS insecure skip verify (Default: ```false```)
`TRAEFIK_LOG_OTLP_GRPC_TLS_KEY`:
TLS key
`TRAEFIK_LOG_OTLP_HTTP`:
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
`TRAEFIK_LOG_OTLP_HTTP_ENDPOINT`:
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
`TRAEFIK_LOG_OTLP_HTTP_HEADERS_<NAME>`:
Headers sent with payload.
`TRAEFIK_LOG_OTLP_HTTP_TLS_CA`:
TLS CA
`TRAEFIK_LOG_OTLP_HTTP_TLS_CERT`:
TLS cert
`TRAEFIK_LOG_OTLP_HTTP_TLS_INSECURESKIPVERIFY`:
TLS insecure skip verify (Default: ```false```)
`TRAEFIK_LOG_OTLP_HTTP_TLS_KEY`:
TLS key
`TRAEFIK_LOG_OTLP_RESOURCEATTRIBUTES_<NAME>`:
Defines additional resource attributes (key:value).
`TRAEFIK_LOG_OTLP_SERVICENAME`:
Set the name for this service. (Default: ```traefik```)
`TRAEFIK_METRICS_ADDINTERNALS`:
Enables metrics for internal services (ping, dashboard, etc...). (Default: ```false```)
@ -1138,7 +1246,7 @@ Defines the allowed SPIFFE IDs (takes precedence over the SPIFFE TrustDomain).
Defines the allowed SPIFFE trust domain.
`TRAEFIK_TRACING`:
OpenTracing configuration. (Default: ```false```)
Tracing configuration. (Default: ```false```)
`TRAEFIK_TRACING_ADDINTERNALS`:
Enables tracing for internal services (ping, dashboard, etc...). (Default: ```false```)
@ -1150,7 +1258,7 @@ Request headers to add as attributes for server and client spans.
Response headers to add as attributes for server and client spans.
`TRAEFIK_TRACING_GLOBALATTRIBUTES_<NAME>`:
Defines additional attributes (key:value) on all spans.
(Deprecated) Defines additional resource attributes (key:value).
`TRAEFIK_TRACING_OTLP`:
Settings for OpenTelemetry. (Default: ```false```)
@ -1200,6 +1308,9 @@ TLS insecure skip verify (Default: ```false```)
`TRAEFIK_TRACING_OTLP_HTTP_TLS_KEY`:
TLS key
`TRAEFIK_TRACING_RESOURCEATTRIBUTES_<NAME>`:
Defines additional resource attributes (key:value).
`TRAEFIK_TRACING_SAFEQUERYPARAMS`:
Query params to not redact.
@ -1207,4 +1318,4 @@ Query params to not redact.
Sets the rate between 0.0 and 1.0 of requests to trace. (Default: ```1.000000```)
`TRAEFIK_TRACING_SERVICENAME`:
Set the name for this service. (Default: ```traefik```)
Sets the name for this service. (Default: ```traefik```)

View file

@ -381,6 +381,32 @@
maxAge = 42
maxBackups = 42
compress = true
[log.otlp]
serviceName = "foobar"
[log.otlp.resourceAttributes]
name0 = "foobar"
name1 = "foobar"
[log.otlp.grpc]
endpoint = "foobar"
insecure = true
[log.otlp.grpc.tls]
ca = "foobar"
cert = "foobar"
key = "foobar"
insecureSkipVerify = true
[log.otlp.grpc.headers]
name0 = "foobar"
name1 = "foobar"
[log.otlp.http]
endpoint = "foobar"
[log.otlp.http.tls]
ca = "foobar"
cert = "foobar"
key = "foobar"
insecureSkipVerify = true
[log.otlp.http.headers]
name0 = "foobar"
name1 = "foobar"
[accessLog]
filePath = "foobar"
@ -401,6 +427,32 @@
[accessLog.fields.headers.names]
name0 = "foobar"
name1 = "foobar"
[accessLog.otlp]
serviceName = "foobar"
[accessLog.otlp.resourceAttributes]
name0 = "foobar"
name1 = "foobar"
[accessLog.otlp.grpc]
endpoint = "foobar"
insecure = true
[accessLog.otlp.grpc.tls]
ca = "foobar"
cert = "foobar"
key = "foobar"
insecureSkipVerify = true
[accessLog.otlp.grpc.headers]
name0 = "foobar"
name1 = "foobar"
[accessLog.otlp.http]
endpoint = "foobar"
[accessLog.otlp.http.tls]
ca = "foobar"
cert = "foobar"
key = "foobar"
insecureSkipVerify = true
[accessLog.otlp.http.headers]
name0 = "foobar"
name1 = "foobar"
[tracing]
serviceName = "foobar"
@ -409,7 +461,7 @@
safeQueryParams = ["foobar", "foobar"]
sampleRate = 42.0
addInternals = true
[tracing.globalAttributes]
[tracing.resourceAttributes]
name0 = "foobar"
name1 = "foobar"
[tracing.otlp]
@ -434,6 +486,9 @@
[tracing.otlp.http.headers]
name0 = "foobar"
name1 = "foobar"
[tracing.globalAttributes]
name0 = "foobar"
name1 = "foobar"
[hostResolver]
cnameFlattening = true

View file

@ -418,6 +418,32 @@ log:
maxAge: 42
maxBackups: 42
compress: true
otlp:
serviceName: foobar
resourceAttributes:
name0: foobar
name1: foobar
grpc:
endpoint: foobar
insecure: true
tls:
ca: foobar
cert: foobar
key: foobar
insecureSkipVerify: true
headers:
name0: foobar
name1: foobar
http:
endpoint: foobar
tls:
ca: foobar
cert: foobar
key: foobar
insecureSkipVerify: true
headers:
name0: foobar
name1: foobar
accessLog:
filePath: foobar
format: foobar
@ -439,9 +465,35 @@ accessLog:
name1: foobar
bufferingSize: 42
addInternals: true
otlp:
serviceName: foobar
resourceAttributes:
name0: foobar
name1: foobar
grpc:
endpoint: foobar
insecure: true
tls:
ca: foobar
cert: foobar
key: foobar
insecureSkipVerify: true
headers:
name0: foobar
name1: foobar
http:
endpoint: foobar
tls:
ca: foobar
cert: foobar
key: foobar
insecureSkipVerify: true
headers:
name0: foobar
name1: foobar
tracing:
serviceName: foobar
globalAttributes:
resourceAttributes:
name0: foobar
name1: foobar
capturedRequestHeaders:
@ -477,6 +529,9 @@ tracing:
headers:
name0: foobar
name1: foobar
globalAttributes:
name0: foobar
name1: foobar
hostResolver:
cnameFlattening: true
resolvConfig: foobar