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
There's no straightforward way to add child spans around getAssetFromKV.
Not to mention, what would one contribute to instrument the different code paths within this utility?
Tried hacking a this.traceProvider.register(); in to set the SDK's provider as the global trace provider. Which did allow me to create new spans with the regular @opentelemetry/api calls and collect them. But they're independent spans. Not picking up the context as you'd want.
The text was updated successfully, but these errors were encountered:
Just testing out the library ❤️
Wondering if I've missed a way to create custom spans.
The use case I've got a few examples for.
One is, we're planning on using some of the bindings not yet supported, like KV, R2 and the
caches
object.And better yet, we're not always calling it directly 😂
For instance with Workers Sites, https://developers.cloudflare.com/workers/platform/sites/start-from-worker/
There's the
@cloudflare/kv-asset-handler
utility which handles a ton of static site boilerplate for you.So while a handler like this works fantastic for the root span:
There's no straightforward way to add child spans around
getAssetFromKV
.Not to mention, what would one contribute to instrument the different code paths within this utility?
Tried hacking a
this.traceProvider.register();
in to set the SDK's provider as the global trace provider. Which did allow me to create new spans with the regular@opentelemetry/api
calls and collect them. But they're independent spans. Not picking up the context as you'd want.The text was updated successfully, but these errors were encountered: