mirror of
https://github.com/fosrl/newt.git
synced 2026-03-26 12:36:45 +00:00
fix(telemetry): update proxyStopper to be a no-op function when registration fails
This commit is contained in:
@@ -224,7 +224,9 @@ func SetProxyObservableCallback(cb func(context.Context, metric.Observer) error)
|
||||
reg, e := meter.RegisterCallback(cb, mProxyActiveConns, mProxyBufferBytes, mProxyAsyncBacklogByte)
|
||||
if e != nil {
|
||||
otel.Handle(e)
|
||||
proxyStopper = func() {}
|
||||
proxyStopper = func() {
|
||||
// no-op: registration failed; keep stopper callable
|
||||
}
|
||||
return
|
||||
}
|
||||
// Provide a functional stopper to unregister later if needed
|
||||
|
||||
Reference in New Issue
Block a user