You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
According to the documentation api.context.setGlobalContextManager()Returns the initialized context manager.
But actually it returns the ContextManager passed even if registerGlobal() detects that there is already a context manager installed and the passed ContextManager is not installed as global.
Similar api.propagation.setGlobalPropagator() returns the propagator passed instead that one installed global.
For api.trace.setGlobalTracerProvider() there is even a difference if installation happens as it always returns this._proxyTracerProvider.
I'm not sure what's correct here.
Returning the current installed global version will cause problems in case of version mismatch
Returning the passed in version may result in having two ContextManagers/TracerProviders/Propagators flying around
I think the best would be to return what one would get if they call api.trace.getTracerProvider() or api.context._getContextManager() (currently private) or api.propagation._getGlobalPropagator() (currently private). So either the global one (version matches) or Noop.
The text was updated successfully, but these errors were encountered:
According to the documentation
api.context.setGlobalContextManager()
Returns the initialized context manager.But actually it returns the
ContextManager
passed even ifregisterGlobal()
detects that there is already a context manager installed and the passedContextManager
is not installed as global.Similar
api.propagation.setGlobalPropagator()
returns the propagator passed instead that one installed global.For
api.trace.setGlobalTracerProvider()
there is even a difference if installation happens as it always returnsthis._proxyTracerProvider
.I'm not sure what's correct here.
I think the best would be to return what one would get if they call
api.trace.getTracerProvider()
orapi.context._getContextManager()
(currently private) orapi.propagation._getGlobalPropagator()
(currently private). So either the global one (version matches) or Noop.The text was updated successfully, but these errors were encountered: