-
Notifications
You must be signed in to change notification settings - Fork 96
Propagation fails if a new root span is not sampled. #119
Comments
On further investigation, the gRPC instrumentation avoids the problem doing a NoOp if span is null. |
I am curious if I am hitting this issue. Yesterday, I added this change to a node server which was already successfully exporting traces to stackdriver:
And I immediately started to get After turning the logging up, I saw a bunch of messages like Btw, I also tracked down this line as the source of the Caveat: the links above aren't necessarily links to the exact same commits as the version I'm using. For reference, my package.json declares the following opencensus dependencies:
Can one of the package maintainers give me some guidance on whether my symptoms are similar enough to this issue? If not, I will open a separate issue. Thanks! |
Closing this. The initial bug was fixed, the wider issues of span propagation remain. |
@tcolgate - any advice on how to follow up on the issue I'm having? |
If a new root span is created by startRootSpan, but the decision is made not to sample it, the rootSpan is not passed on (instead null is passed). This results in the propagation code attempting to dereference null to read a spanContext (propagating an unsampled span context is valid behaviour I believe, so that the no-sample decision is passed on).
see:
opencensus-core/src/trace/model/tracer.ts:132
and:
instrumentation-http/build/src/http.js:186
The instrumentation handler should probably be more cautious, but the root span creation should also be passing on the new span.
The text was updated successfully, but these errors were encountered: