1
0
Fork 0

Merge branch v3.5 into master

This commit is contained in:
romain 2025-10-16 08:33:29 +02:00
commit 05de0670ea
120 changed files with 2926 additions and 4619 deletions

View file

@ -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 {

View file

@ -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)

View file

@ -11,7 +11,7 @@ type ResourceEventHandler struct {
}
// OnAdd is called on Add Events.
func (reh *ResourceEventHandler) OnAdd(obj interface{}, isInInitialList bool) {
func (reh *ResourceEventHandler) OnAdd(obj interface{}, _ bool) {
eventHandlerFunc(reh.Ev, obj)
}

View file

@ -49,15 +49,17 @@ func (o *ocspStapler) Run(ctx context.Context) {
ticker := time.NewTicker(time.Hour)
defer ticker.Stop()
select {
case <-ctx.Done():
return
for {
select {
case <-ctx.Done():
return
case <-o.forceStapleUpdates:
o.updateStaples(ctx)
case <-o.forceStapleUpdates:
o.updateStaples(ctx)
case <-ticker.C:
o.updateStaples(ctx)
case <-ticker.C:
o.updateStaples(ctx)
}
}
}