Closed chadbrad closed 4 years ago
I'd like to know if this will be implemented similarly to how it was done in Java here: https://github.com/lightstep/lightstep-tracer-java-common/issues/56
Main things I'd like to see would be:
@ledor473 here's the initial stab at B3 headers: https://github.com/lightstep/lightstep-tracer-javascript/pull/177
However, reading through the gotchas I think the custom propagators approach should be used here. I'll take another stab with that method.
@bg451 as you've said I think the _inject
and _extract
method should be configurable instead of adding a new Format.
Something like this would be very neat and allow to migrate from other platform (Jaeger instead of Zipkin):
class MyOwnPropagator {
inject(spanContext, format, carrier) {
// Do stuff
}
extract(format, carrier) {
// Do stuff
return spanContext;
}
}
myOwnPropagator = new MyOwnPropagator();
var myPropagators = {};
myPropagators[opentracing.FORMAT_HTTP_HEADERS] = myOwnPropagator;
myPropagators[opentracing.FORMAT_TEXT_MAP] = myOwnPropagator;
opentracing.initGlobalTracer(new lightstep.Tracer({
access_token : '{your_access_token}',
component_name : '{your_service_or_app_name}',
propagators : myPropagators,
}));
Think this was done in https://github.com/lightstep/lightstep-tracer-javascript/pull/177, closing this ticket out.
Please add B3 header support :)
Please see this doc for the problem statement and specifics: https://docs.google.com/document/d/1ukvnSoXkavcojlVXpCRzep8PS_guXly_NbbhHIDgbFY/edit