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
The proposal is that we move all globals out of the main trace and metrics package. The global tracer and meter objects will be registered in another package, opentelemtry, along with the Init() method discussed in OTEP 0005.
Eliminating globals from the main packages allows globals package to auto-initialize by loading a plugin, for example; if we separate globals from these packages now, this can be a future option. If we leave globals in the main packages, we cannot do this. It is impossible to auto-load a plugin that depends on the package that is loading it. When there are no globals in the packages themselves, it becomes possible for a binary plugin to to be loaded that implements the Tracer or Meter interfaces, at the first moment when the globals are referenced.
There is an old proof-of-concept showing how this could work in the future, provided that we separate globals from the main API packages now. #52
The text was updated successfully, but these errors were encountered:
More concretely, I propose the top-level opentracing package contain something like these three methods:
Init(TracerFactory, MeterFactory) initializes opentracing global factories GlobalTracer(name string) Tracer gets a named tracer from the global tracer factory GlobalMeter(name string) Tracer gets a named meter from the global meter factory
The proposal is that we move all globals out of the main
trace
andmetrics
package. The global tracer and meter objects will be registered in another package,opentelemtry
, along with theInit()
method discussed in OTEP 0005.Eliminating globals from the main packages allows globals package to auto-initialize by loading a plugin, for example; if we separate globals from these packages now, this can be a future option. If we leave globals in the main packages, we cannot do this. It is impossible to auto-load a plugin that depends on the package that is loading it. When there are no globals in the packages themselves, it becomes possible for a binary plugin to to be loaded that implements the
Tracer
orMeter
interfaces, at the first moment when the globals are referenced.There is an old proof-of-concept showing how this could work in the future, provided that we separate globals from the main API packages now. #52
The text was updated successfully, but these errors were encountered: