fix(sonar-telemetry): update observeSessionsFor function to include siteID and improve attribute handling

This commit is contained in:
Marc Schäfer
2025-10-08 08:13:35 +02:00
parent ed127a2d61
commit ae5129a7c7
3 changed files with 12 additions and 8 deletions

View File

@@ -210,7 +210,9 @@ func SetObservableCallback(cb func(context.Context, metric.Observer) error) {
reg, e := meter.RegisterCallback(cb, mSiteOnline, mSiteLastHeartbeat, mTunnelSessions)
if e != nil {
otel.Handle(e)
obsStopper = func() {}
obsStopper = func() {
// no-op: registration failed; keep stopper callable
}
return
}
// Provide a functional stopper mirroring proxy/build-info behavior