-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Rework baggage page to be less trace-specific #4692
Conversation
Should fix #3674 and #1878 (comment)
/fix:format |
You triggered fix:format action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/9529813909 |
Would it be worth calling out somehow that baggage is only intended for Observability data, and that it's not recommended to use it to side channel values for other purposes (control flow, etc)? |
@austinlparker added |
/fix:format |
You triggered fix:format action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/9531320659 |
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.
Thank you! Some remarks
Co-authored-by: Severin Neumann <[email protected]> Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
|
||
For example, in .NET you might do this: | ||
To add Baggage entries to attributes, you need to explicitly read that data and | ||
add it. For example, in .NET you might do this: |
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.
could we switch to use any language here other than .NET? ("Activity", "Tag" are unknown terms outside .NET, so best to keep this example neutral)
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 removed it -- decided it's not worth putting code samples in here right now.
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.
Do we have any languages that mention the baggage API already? If so we might consider having some listing similar to the sampling page?
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.
Not that I'm aware of, no.
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.
Would be nice if we can add new page/section for each language to show how to use the Baggage API.
https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Api#baggage-api is what we kept in code repo for .NET so far. Every language would be already having similar content. We can copy/move them all to the docs website.
|
||
```csharp | ||
var accountId = Baggage.GetBaggage("AccountId"); | ||
Activity.Current?.SetTag("AccountId", accountId); | ||
``` | ||
|
||
Because one of the most common use cases for Baggage is to add data to |
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 am not sure if the part "Because one of the most common use cases" is relevant here.
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.
Reworded a bit. It is common, maybe not the most common
Co-authored-by: Cijo Thomas <[email protected]>
/fix:format |
You triggered fix:format action run at https://github.com/open-telemetry/opentelemetry.io/actions/runs/9682963027 |
@theletterf any final thoughts? |
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.
Approved!
Should fix #3674 and #1878 (comment)
Tried to capture how Baggage isn't trace-specific while still honoring the reality that it's usually used the most in conjunction with tracing.
cc @cijothomas