mirror of
https://github.com/fosrl/newt.git
synced 2026-09-17 11:29:07 +02:00
fix(telemetry): update proxyStopper to be a no-op function when registration fails
Former-commit-id: 20ddbb53823b1a66031a2844b98f0e151dc2644b
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