diff --git a/docs/content/migrate/v3.md b/docs/content/migrate/v3.md index 8f8194fef..82f11f66e 100644 --- a/docs/content/migrate/v3.md +++ b/docs/content/migrate/v3.md @@ -489,3 +489,10 @@ To use the new `proxyprotocol` option in the Kubernetes CRD provider, you need t ```shell kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.5/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml ``` + +## v3.5.4 + +### Certificate Metric Renamed with OpenTelemetry + +Starting with `v3.5.4`, and when using OpenTelemetry, the `traefik_tls_certs_not_after_milliseconds` metric is renamed to `traefik_tls_certs_not_after_seconds`. +This change aligns the metric name with its real unit precision, which is in seconds. diff --git a/pkg/observability/metrics/otel.go b/pkg/observability/metrics/otel.go index cfb3f50ef..eaf95e736 100644 --- a/pkg/observability/metrics/otel.go +++ b/pkg/observability/metrics/otel.go @@ -125,7 +125,7 @@ func RegisterOpenTelemetry(ctx context.Context, config *otypes.OTLP) Registry { configReloadsCounter: newOTLPCounterFrom(meter, configReloadsTotalName, "Config reloads"), lastConfigReloadSuccessGauge: newOTLPGaugeFrom(meter, configLastReloadSuccessName, "Last config reload success", "ms"), openConnectionsGauge: newOTLPGaugeFrom(meter, openConnectionsName, "How many open connections exist, by entryPoint and protocol", "1"), - tlsCertsNotAfterTimestampGauge: newOTLPGaugeFrom(meter, tlsCertsNotAfterTimestampName, "Certificate expiration timestamp", "ms"), + tlsCertsNotAfterTimestampGauge: newOTLPGaugeFrom(meter, tlsCertsNotAfterTimestampName, "Certificate expiration timestamp", "s"), } if config.AddEntryPointsLabels { diff --git a/pkg/observability/metrics/otel_test.go b/pkg/observability/metrics/otel_test.go index 756f98ae8..abcb1856f 100644 --- a/pkg/observability/metrics/otel_test.go +++ b/pkg/observability/metrics/otel_test.go @@ -365,7 +365,7 @@ func TestOpenTelemetry(t *testing.T) { tryAssertMessage(t, c, expectedConfig) expectedTLSCerts := []string{ - `({"name":"traefik_tls_certs_not_after","description":"Certificate expiration timestamp","unit":"ms","gauge":{"dataPoints":\[{"attributes":\[{"key":"key","value":{"stringValue":"value"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, + `({"name":"traefik_tls_certs_not_after","description":"Certificate expiration timestamp","unit":"s","gauge":{"dataPoints":\[{"attributes":\[{"key":"key","value":{"stringValue":"value"}}\],"startTimeUnixNano":"[\d]{19}","timeUnixNano":"[\d]{19}","asDouble":1}\]}})`, } registry.TLSCertsNotAfterTimestampGauge().With("key", "value").Set(1)