Mark G
Mark G2mo ago

How do I propagate OTEL context into a Worker?

First, should I expect that the context is propagated via postMessage to Workers automatically? I assumed not, so I've tried using propagation.inject/extract with a plain object as the carrier to pass the context in the message of postMessage. It appears that the carrier doesn't contain any data, when using Deno's native OTEL. I've tried also using the NodeSDK directly too with Deno OTEL disabled, and the carrier does appear to have a traceparent. Has anyone else managed to propagate into a Worker? Does this seem to be a bug in Deno?
2 Replies
Mark G
Mark GOP2mo ago
I think this could be a bug, here's a demonstration... https://github.com/jollytoad/otel-worker-propagation ... i'll raise a github issue.
GitHub
GitHub - jollytoad/otel-worker-propagation: Demonstration of OTEL p...
Demonstration of OTEL propagation into a Worker, and Deno bug - jollytoad/otel-worker-propagation
lcasdev
lcasdev2mo ago
cc @crowlKats

Did you find this page helpful?