-
Notifications
You must be signed in to change notification settings - Fork 64
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
What should a trace id and span id look like? #5
Comments
B3 ids are fixed-length lowerhex encoded values Ex. "48485a3953bb6124". These are easy to copy/paste vs numeric values or UUIDs which have hyphens in them. They are expected to be fully random. This is important as some samplers are probabilistic and assume each bit is equally likely. Traditionally, the start of a trace (root span) has the same value for trace id and span id. The root span has no parent id. Its child would share a trace id with its parent, but provision a new span id. Ex. root span:
And its child
Since spans are contained within the namespace of a trace, and traces usually have orders of hundreds of spans or less, there's little likelihood that a 64bit span id will ever clash. However, 64bit trace identifiers are possible to clash in high-traffic circumstances, such as client-originated traces (devices or cars, for example), or very high volume websites (like twitter). For this reason, 128bit support will be added for trace identifiers (via #1). When these are added, they will have the following conventional behavior.
Ex. 128 bit root span:
This allows "compatibility mode" where a system that chooses to only look at the lower 64bits of a 128bit trace id appear exactly the same as prior practice. NOTE At the time of this writing 128 bit ids are not in use yet, and won't be until at least #1 is merged |
@adriancole prepending high 64bits to |
So the node that starts the trace makes the decision whether to use 128 The thinking is that users should do a wave of updates where they toss the This probably hints at an operations story where you do analysis on the On Wed, Sep 14, 2016 at 10:37 AM, Yuri Shkuro [email protected]
|
the general tradeoff is this:
On mitigator of time, is that we are in open source and can update tracers For example, the good thing about B3 being historically under-specified is |
Thanks. I had a different approach in mind with sending an alternative header in parallel with the old one during the transition, but I like your approach better. They both have a similar time horizon, can't flip a switch until the first wave of upgrades reaches critical mass, and once the switch is flipped the non-upgraded holdout services won't be able to parse the header and will be starting new traces. |
added #6 for tracking library updates to 128bit |
from a question: spring-cloud/spring-cloud-sleuth#400 (comment)
The text was updated successfully, but these errors were encountered: