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

New API:getActiveBaggage? #3354

Closed
cartermp opened this issue Oct 24, 2022 · 1 comment · Fixed by #3385
Closed

New API:getActiveBaggage? #3354

cartermp opened this issue Oct 24, 2022 · 1 comment · Fixed by #3385
Labels
feature-request pkg:api up-for-grabs Good for taking. Extra help will be provided by maintainers

Comments

@cartermp
Copy link
Contributor

This is inspired by two things:

  • Code in the demo app that gets the current baggage and snags data from it
  • The .NET baggage API which defines a Current property to get/set whatever the current baggage is from the active context

This api could work similar to getActiveSpan, wherein the getActiveBaggage API just calls propagation.getBaggage(api.context.active()).

Working with baggage is much less common than getting the current/active span, though, so the relative importance is low. I just think that every time you have to write api.context.active() and you're not doing super fancy context stuff, that smells like a need for an API 🙂

@dyladan dyladan added the up-for-grabs Good for taking. Extra help will be provided by maintainers label Nov 2, 2022
@dyladan
Copy link
Member

dyladan commented Nov 2, 2022

I would support this addition

vmarchaud pushed a commit that referenced this issue Nov 20, 2022
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
Resolves #3354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request pkg:api up-for-grabs Good for taking. Extra help will be provided by maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants