zipkin-javascript-opentracing icon indicating copy to clipboard operation
zipkin-javascript-opentracing copied to clipboard

Mismatch in extract/inject format constants

Open williambailey opened this issue 7 years ago • 2 comments

I'm having issues using this library as a transport for the opentracing package via opentracing.initGlobalTracer(tracer); due to a mismatch in the values of the transport constants.

The result is Error: extract called with unsupported format when trying to use the tracer to extract or inject.

The opentracing packages has export const FORMAT_HTTP_HEADERS = 'http_headers';

This packages has Tracing.FORMAT_HTTP_HEADERS = "FORMAT_HTTP_HEADERS";

williambailey avatar Feb 22 '18 15:02 williambailey

Thank you for filing the issue 👍 It appears that you made all the research necessary to fix this issue, it would be great if you could file a PR for this. I would totally love a little unit test catching this in the future if you have the time. Thank you for your interest on this project 👍

DanielMSchmidt avatar Feb 22 '18 15:02 DanielMSchmidt

We even have opentracing as peer dependency, I wonder why there is no test to notice this 🤔

DanielMSchmidt avatar Feb 22 '18 15:02 DanielMSchmidt