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
Right now you have to import @deno/otel to hook Deno's built in OpenTelemetry API into @opentelemetry/api. @opentelemetry/api however has code to read all three of these from the global object. This code is intended to ensure that multiple copies of @opentelemetry/api can still work correctly.
I propose we set this global on startup as follows:
This may seem a bit unorthodox, but it is very useful because users do not have to import @deno/otel anymore. This is particularly helpful when using frameworks where you may not control the entrypoint (Next.js, Remix, etc).
I want to run this by the otel-js folks, but I don't think this is really very controversial - one could think of this as bundling @opentelemetry/api and automatically invoking trace.setGlobalTraceProvider and friends on startup.
The text was updated successfully, but these errors were encountered:
Right now you have to import
@deno/otel
to hook Deno's built in OpenTelemetry API into@opentelemetry/api
.@opentelemetry/api
however has code to read all three of these from the global object. This code is intended to ensure that multiple copies of@opentelemetry/api
can still work correctly.I propose we set this global on startup as follows:
This may seem a bit unorthodox, but it is very useful because users do not have to import
@deno/otel
anymore. This is particularly helpful when using frameworks where you may not control the entrypoint (Next.js, Remix, etc).I want to run this by the otel-js folks, but I don't think this is really very controversial - one could think of this as bundling
@opentelemetry/api
and automatically invokingtrace.setGlobalTraceProvider
and friends on startup.The text was updated successfully, but these errors were encountered: