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

No way to create a custom propagator #229

Closed conartist6 closed 4 years ago

conartist6 commented 4 years ago

There is an API which allows you to pass a custom propagator as an option, but the propagator is meant to convert back and forth between a SpanContext and a carrier. Unfortunately SpanContext is private, so there's no way to actually use the API without completely reimplementing SpanContext (or importing it from the library internals). While both are technically easy, neither seems like a good idea.

conartist6 commented 4 years ago

Actually creating a custom span context is even iffier than I supposed, because the tracer uses private fields of the span context!! : (