lightstep / lightstep-tracer-javascript

Lightstep distributed tracing library for Node.js and the browser
https://lightstep.com
MIT License
77 stars 66 forks source link

Support for ot-tracer-sampled #290

Closed mattolson closed 2 years ago

mattolson commented 2 years ago

It appears that currently this library understands the ot-tracer-sampled header and will set a bit on the SpanContext appropriately, and even propagate this bit to child spans. However, this information is not used in any way. It is not used to trim spans from the report prior to sending to the collectors, nor is it serialized into the report for the collectors to use.

Ideally, when a span is closed, we would not record it if sampled is false. If not, we should serialize this information so the collectors can use it to avoid sending the trace to the Lightstep platform.

mwear commented 2 years ago

These changes have been released in v0.34.0 and v0.34.0-no-protobuf: