Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Move set/get_baggage back to Span; add SpanContext.baggage #33

Merged
merged 1 commit into from
Aug 6, 2016

Conversation

yurishkuro
Copy link
Member

:rtype : str
:return: value of the Baggage item with given key, or None.
:rtype: dict
:return: returns baggage associated with this SpanContext or {}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the or {} is superfluous (if there's no baggage, then of course the map would be empty, right?)

Copy link
Member Author

@yurishkuro yurishkuro Aug 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to emphasize that a valid dictionary must always be returned, because the use of @property lands itself to usage like ctx.baggage["somekey"].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Well, "nit" either way, no strong feelings here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh: can you add a note that the caller should not modify the return value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already says so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh, indeed it does. great minds, etc...

@bhs
Copy link
Contributor

bhs commented Aug 6, 2016

LGTM

@yurishkuro yurishkuro merged commit 26c0851 into master Aug 6, 2016
@yurishkuro yurishkuro deleted the ys/baggage-back-to-span branch February 25, 2018 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants