Open seanyu4296 opened 3 years ago
if we want to respect "opentelemtery specification" i think extract
should also be modified to.
const traceId = id(traceIdHeaderValue, 10).toString('hex').padStart(32, '0'); // pad this for opentelemetry
const spanId = id(spanIdHeaderValue, 10).toString('hex');
Describe the bug The code for
inject
in propagator is wrong if you compare it to the implementation herehttps://github.com/open-telemetry/opentelemetry-collector-contrib/blob/f1e8331be111a4a8bf65670dfaff359714edef85/exporter/datadogexporter/translate_traces.go#L465-L470
https://github.com/DataDog/dd-opentelemetry-exporter-js/blob/7682aabe492f4d1c2d7d0d8acbfc013eeae1ea53/src/datadogPropagator.ts#L48-L50
Correct implementation seems to be + substring it if necessary
cc @ericmustin