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

Clarify whether X-B3-Flags should be propagated #24

Closed
mpuncel opened this issue Aug 31, 2018 · 11 comments
Closed

Clarify whether X-B3-Flags should be propagated #24

mpuncel opened this issue Aug 31, 2018 · 11 comments

Comments

@mpuncel
Copy link

mpuncel commented Aug 31, 2018

I feel that the README doesn't quite spell out whether X-B3-Flags should be propagated in HTTP headers. Reading between the lines, it seems like the library that receives X-B3-Flags: 1 should swallow that header and propagate X-B3-Sampled: 1 to the next process. Is that understanding correct?

@basvanbeek
Copy link
Member

X-B3-Flags is indeed an odd one... There are two options:

  • X-B3-Flags is omitted (not propagated)
  • X-B3-Flags is sent with a payload of 1 if requesting Debug

0 payload for Flags does not exist, it is also not a bit flag.

If X-B3-Flags = 1 you should omit the X-B3-Sampled header see: https://github.com/openzipkin/b3-propagation#debug-flag-1

@mpuncel
Copy link
Author

mpuncel commented Aug 31, 2018

I still feel a bit confused. Are you talking about the requester initiating a debug trace should not send X-B3-Sampled (because X-B3-Flags = 1)? Or are you talking about every process that is involved in the debug trace should only propagate X-B3-Flags: 1 and omit X-B3-Sampled?

e.g.
debug set
X-B3-Flags: 1 -> A -> X-B3-Flags: 1 -> B

debug not set
X-B3-Sampled: 0|1 -> A -> X-B3-Flags: 0|1 -> B

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 31, 2018 via email

@mpuncel
Copy link
Author

mpuncel commented Aug 31, 2018

For context, I'm building B3 header propagation into my services, but I'm not doing any actual sampling, trace context generation, or in-process tracing, I'm leveraging Envoy for that at this point

@mpuncel
Copy link
Author

mpuncel commented Aug 31, 2018

got it. Sounds like my propagation should just look at all 5 headers, and copy them forward. In practice only 4 will be set at a time because X-B3-Flags is mutually exclusive with X-B3-Sampled, but my code doesn't need to know that

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 31, 2018 via email

@mpuncel
Copy link
Author

mpuncel commented Aug 31, 2018

got it, thanks for the quick responses!

@jcchavezs
Copy link
Contributor

jcchavezs commented Aug 31, 2018 via email

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 31, 2018 via email

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Aug 31, 2018 via email

@codefromthecrypt
Copy link
Member

ps #26 should have sorted this

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

No branches or pull requests

4 participants