-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagates logs and reports 128-bit trace IDs #452
Conversation
public Span(long begin, long end, String name, long traceId, List<Long> parents, | ||
long spanId, boolean remote, boolean exportable, String processId) { | ||
this(begin, end, name, traceId, parents, spanId, remote, exportable, processId, | ||
null); | ||
} | ||
|
||
/** | ||
* @deprecated please use {@link SpanBuilder} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continuing to overload public ctors would become rediculous
* }</pre> | ||
* | ||
* @see #traceIdString() | ||
* @since 1.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is worthwhile to backport this to 1.0 and 1.1, even though it would be annoying. The reason is that these versions will be around a long time, and truncate trace ids perpetually unless we do..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
* }</pre> | ||
* | ||
* @see #traceIdString() | ||
* @since 1.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
@@ -68,7 +68,7 @@ public void inject(Span span, SpanTextMap carrier) { | |||
} | |||
carrier.put(Span.SAMPLED_NAME, span.isExportable() ? | |||
Span.SPAN_SAMPLED : Span.SPAN_NOT_SAMPLED); | |||
carrier.put(Span.TRACE_ID_NAME, Span.idToHex(span.getTraceId())); | |||
carrier.put(Span.TRACE_ID_NAME, span.traceIdString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the traceIdString
method :)
This supports 128-bit traces via a new field traceIdHigh, which matches other zipkin implementations. In encoded form, the trace ID is simply twice as long (32 hex characters). With this change in, a 128-bit trace propagated will not be downgraded to 64-bits when sending downstream, reporting to Zipkin or adding to the logging context. This will be followed by a change to support initiating 128-bit traces.
cbca519
to
1027cf4
Compare
changed since thing to 1.0.11 |
Current coverage is 75.09% (diff: 95.34%)@@ master #452 diff @@
==========================================
Files 140 140
Lines 3026 3056 +30
Methods 0 0
Messages 0 0
Branches 419 420 +1
==========================================
+ Hits 2253 2295 +42
+ Misses 588 578 -10
+ Partials 185 183 -2
|
This supports 128-bit traces via a new field traceIdHigh, which matches
other zipkin implementations. In encoded form, the trace ID is simply
twice as long (32 hex characters).
With this change in, a 128-bit trace propagated will not be downgraded
to 64-bits when sending downstream, reporting to Zipkin or adding to
the logging context.
This will be followed by a change to support initiating 128-bit traces.
See openzipkin/b3-propagation#6