fix(build): use Registration.Unregister() without context; return tracer shutdown func from setupTracing

This commit is contained in:
Marc Schäfer
2025-10-08 01:07:08 +02:00
parent ee2f8899ff
commit 587e829e42
2 changed files with 6 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ func registerBuildWSProxyInstruments() error {
otel.Handle(e)
} else {
// Provide a functional stopper that unregisters the callback
obsStopper = func() { _ = reg.Unregister(context.Background()) }
obsStopper = func() { _ = reg.Unregister() }
}
return nil
}
@@ -224,7 +224,7 @@ func SetProxyObservableCallback(cb func(context.Context, metric.Observer) error)
return
}
// Provide a functional stopper to unregister later if needed
proxyStopper = func() { _ = reg.Unregister(context.Background()) }
proxyStopper = func() { _ = reg.Unregister() }
})
}