Closed mw10013 closed 1 month ago
Duplicate of https://github.com/evanderkoogh/otel-cf-workers/issues/115#issuecomment-2041365703, please make sure your direct opentelemetry dependencies can be satisfied by versions used by the library.
Thanks. That worked for me.
Ask for help with
trace.getActiveSpan()
andstartActiveSpan()
.I updated the dependencies of
examples/worker
and switched the config tobaselime
instead ofhoneycomb
. Able to run locally and get traces and events to appear in baselime. However, I don't see any of the custom attributes set withtrace.getActiveSpan()?.setAttribute()
.https://github.com/evanderkoogh/otel-cf-workers/blob/6f1c79056776024fd3e816b9e3991527e7217510/examples/worker/src/handler.ts#L17-L29
Adding console.log's and an explicit
startActiveSpan()
shows that getActiveSpan() seems to return undefined. Also don't know what to make ofNonREcordingSpan2
with zeroed traceId and spanId.Would appreciate any guidance on how I can get an actual span from getActiveSpan() and get span within startActiveSpan() to show up in baselime. Thanks.