You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
Requirement - what kind of business use case are you trying to solve?
jaeger-java-client should implement the specification in opentracing-java
Specifically, JaegerTracer should implement io.opentracing.Tracer according to the spec, and JaegerSpan should implement io.opentracing.Span according to the spec.
Problem - what in Jaeger blocks you from solving the requirement?
JaegerTracer::withTag(Tag<T>, T) and JaegerSpan::setTag(Tag<T>, T) implementations are incompatible with the OpenTracing specification.
Tracer::withTag is specified to function like (Abstract)Tag::set(Span, T). However, JaegerTracer's implementation does not call Tag::set. The "injectable tagging behavior" represented by Tag is lost.
The same issue is present in JaegerSpan::setTag(Tag<T>, T).
I don't think there's actually a clear expectation that span/builder implementations must do a double-dispatch to tag.set(), it was certainly not how the original PR opentracing/opentracing-java#311 implemented it for mock tracer.
Requirement - what kind of business use case are you trying to solve?
jaeger-java-client should implement the specification in opentracing-java
Specifically, JaegerTracer should implement io.opentracing.Tracer according to the spec, and JaegerSpan should implement io.opentracing.Span according to the spec.
Problem - what in Jaeger blocks you from solving the requirement?
JaegerTracer::withTag(Tag<T>, T)
andJaegerSpan::setTag(Tag<T>, T)
implementations are incompatible with the OpenTracing specification.Tracer::withTag is specified to function like
(Abstract)Tag::set(Span, T)
. However, JaegerTracer's implementation does not call Tag::set. The "injectable tagging behavior" represented byTag
is lost.The same issue is present in
JaegerSpan::setTag(Tag<T>, T)
.The test for JaegerSpan passes because it asserts the incorrect result. See https://github.com/jaegertracing/jaeger-client-java/blob/master/jaeger-core/src/test/java/io/jaegertracing/internal/JaegerSpanTest.java#L176
Proposal - what do you suggest to solve the problem or improve the existing situation?
The test should be amended to assert that the value is
null
, notthis
.The implementations should be amended similar to this:
though perhaps with a little more finesse to short-circuit in the case of non-sampled contexts.
Any open questions to address
None that I'm aware of. Happy to be wrong!
The text was updated successfully, but these errors were encountered: