openzipkin/zipkin-js

add explicit traceId parameter to everything and fix leaky instrumentation

Open

#435 opened on Jul 31, 2019

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (167 forks)auto 404
help wanted

Repository metrics

Stars
 (569 stars)
PR merge metrics
 (PR metrics pending)

Description

Use of Tracer.setId is a bug. It has led to so many leaks and confusing "should I use scoped?" where the answer is everywhere due to routine use of Tracer.setId

While a v2 rewrite (which never allows this command) is a nice way out, it is unlikely a volunteer will muster the energy to do that, unless they have several weeks time.

Another way is to add a last parameter to everything with traceId, which allows explicit (leak-free) usage of the tracer. then, make the http instrumentation classes use that instead of perpetually leaking trace ids.

scoping should never be used for our instrumentation, in other words. scoping is only for third party code. let's stop routinely using it, which will stop the routine bugs created in nearly every package.

Contributor guide