-
Hello all, I am working on a project where we would like to use the baggage propagation across different distributed service calls (to pass non-sensitive information and also "fire-walled" in private VPC). What I am finding is leaving me scratching my head a bit, but it seems that the baggage is not auto-injected/instrumented. I have my env set up to use baggage: Example - I took the Dice example, added baggage, and a call to another service called dice-multiply (just trying to set up a POC of sorts):
In that example, the call to This code, however, works:
Breakpoint stop shows it adds the baggage, and then in the Is this working as expected? In order to use the baggage propagation, do we have to explicitly inject which basically means we need our own HTTP wrapper/middleware to ensure it actually gets injected and sent over the wire? I was hoping that it would just propagate the baggage without this explicit injection requirement... Any help you can provide is greatly appreciated!!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Note that if I add this, then it does get injected without being explicit:
Is that basically the way to make the baggage propagate properly? |
Beta Was this translation helpful? Give feedback.
-
Hi @chiarag, thanks for reaching out! I'm still pretty new to Baggage, but I'll do my best to figure it out with you. I'm also going to bring this discussion up during the Ruby SIG meeting this Tuesday, November 19, at 9:00AM PT. You're welcome to join if you're available! You can subscribe to the SIG's calendar here to get the Zoom link. The API documentation for Unfortunately, it doesn't look like
I'm assuming that "implicit" context in the excerpt above means current context. All of this is to say that I'm not sure what the proper way is to propagate baggage. To me, it seems like your first example should be sufficient, but I haven't seen this used in the wild on real web apps to know how most users do it. I'd like to add an example to capture best practices for Baggage based on what we learn during this discussion. |
Beta Was this translation helpful? Give feedback.
Note that if I add this, then it does get injected without being explicit:
Is that basically the way to make the baggage propagate properly?