Skip to content
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

Supports 128-bit trace IDs, generating them on traceId128Bit(true) #258

Merged
merged 1 commit into from
Oct 28, 2016

Conversation

codefromthecrypt
Copy link
Member

Traditionally, Zipkin trace IDs were 64-bit. Starting with Zipkin 1.14,
128-bit trace identifiers are supported. This can be useful in sites that
have very large traffic volume, persist traces forever, or are re-using
externally generated 128-bit IDs.

If you want Brave to generate 128-bit trace identifiers when starting new
root spans, set Brave.Builder.traceId128Bit(true)

When 128-bit trace ids are propagated, they will be twice as long as
before. For example, the X-B3-TraceId header will hold a 32-character
value like 163ac35c9f6413ad48485a3953bb6124.

Before doing this, ensure your Zipkin setup is up-to-date, and downstream
instrumented services can read the longer 128-bit trace IDs.

Note: this only affects the trace ID, not span IDs. For example, span ids
within a trace are always 64-bit.

See openzipkin/zipkin#1298
See openzipkin-contrib/zipkin-go-opentracing#31

@@ -181,39 +181,19 @@ public void testStartNewSpanSampleNullNotPartOfExistingSpan() {
}

@Test
public void testStartNewSpanSampleTrueNotPartOfExistingSpan() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid use case as the method tested was never public or used

@codefromthecrypt
Copy link
Member Author

cc @openzipkin/core @openzipkin/instrumentation-owners fyi this is the second library to support 128-bit trace ids, after zipkin-go-opentracing

Traditionally, Zipkin trace IDs were 64-bit. Starting with Zipkin 1.14,
128-bit trace identifiers are supported. This can be useful in sites that
have very large traffic volume, persist traces forever, or are re-using
externally generated 128-bit IDs.

If you want Brave to generate 128-bit trace identifiers when starting new
root spans, set `Brave.Builder.traceId128Bit(true)`

When 128-bit trace ids are propagated, they will be twice as long as
before. For example, the `X-B3-TraceId` header will hold a 32-character
value like `163ac35c9f6413ad48485a3953bb6124`.

Before doing this, ensure your Zipkin setup is up-to-date, and downstream
instrumented services can read the longer 128-bit trace IDs.

Note: this only affects the trace ID, not span IDs. For example, span ids
within a trace are always 64-bit.
@jcarres-mdsol
Copy link

Cool, I like having a reference implementation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants