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

Rename CorrelationContext to Baggage #857

Merged
merged 6 commits into from
Aug 26, 2020

Conversation

bogdandrutu
Copy link
Member

Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com

Fixes #536

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@@ -13,7 +13,7 @@ The OpenTelemetry specification describes the cross-language requirements and ex
- [Library Guidelines](specification/library-guidelines.md)
- [Package/Library Layout](specification/library-layout.md)
- API Specification
- [CorrelationContext](specification/correlationcontext/api.md)
- [Baggage](specification/baggage/api.md)
Copy link
Member

Choose a reason for hiding this comment

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


### Baggage

`Baggage` is used to annotate telemetry, adding context and information to metrics, traces, and logs.
Copy link
Member

Choose a reason for hiding this comment

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

Not part of name change, but a question about Baggage - Does all the Baggage entries becomes part of Span attributes automatically? Or user has to write SpanProcessor to read Baggage, then populate it into Span.Attributes?

### Baggage

`Baggage` is used to annotate telemetry, adding context and information to metrics, traces, and logs.
It is an abstract data type represented by a set of name/value pairs describing user-defined properties.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

FWIW I went with a string in the .NET library because we lose all typing info propagating as W3C Baggage.


#### Header Name

`Baggage` implementations MUST use the header name `otcorrelations`.
Copy link
Member

Choose a reason for hiding this comment

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

Is this still the recommendation or we can now use Baggage?
#536 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

let's track it separately. I think we should keep the renaming PR small. @cijothomas can you file this issue?

Copy link
Member

Choose a reason for hiding this comment

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

@cijothomas have you created an issue?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

sorry i didn't hit submit:(
Thanks for creating the issue!

@@ -0,0 +1,138 @@
# Baggage API
Copy link
Member

Choose a reason for hiding this comment

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

Any thoughts on naming this BaggageContext?
cc: @CodeBlanch


`Context` the context containing the `Baggage` from which to get the baggages.

### Get baggage
Copy link
Member

@CodeBlanch CodeBlanch Aug 22, 2020

Choose a reason for hiding this comment

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

I just happen to be working on this in the .NET library right now. Here's some questions in case we get into something other than the name change.

  • What type of case sensitivity should we have for keys?

  • What should the behavior be when null is passed as name to GetBaggage/SetBaggage/RemoveBaggage? Throw error or return null/do nothing?

  • What happens if you SetBaggage('name', null)? Is null valid? Should that throw? Should null remove the item if it exists (like we do for tags)?

@carlosalberto carlosalberto added spec:baggage Related to the specification/baggage directory area:api Cross language API specification issue release:required-for-ga Must be resolved before GA release, or nice to have before GA priority:p3 Lowest priority level labels Aug 22, 2020
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

I'd like to keep renaming PR small. It would be great to make some of comments to be issues. @cijothomas @bogdandrutu can you file those?

@cijothomas consider re-reviewing this PR with the smaller scope of just renaming. Keeping big PRs open cause more work merging things

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Approve from name change perspective - still need changelog entry.

Opening separate issues to address other questions about Baggage API which is not tied to the renaming PR.

@carlosalberto carlosalberto self-requested a review August 25, 2020 13:14
Copy link

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Very happy to see Baggage name be adopted in otel; it's also what we set out with and arrived at in (server side) Swift, great that all terms are finally getting fleshed out 👍

(BaggageContext could also be good (in fact, that's what we do today), but Baggage is good, especially since it is carried in a context and one would want to avoid people writing "context.context" which we've seen some, so taking the context part of the name away helps in clarity).

👍

@SergeyKanzhelev
Copy link
Member

this has enough approvals. Letting this PR cool off for another day and will merge tonight if no objections.

@carlosalberto
Copy link
Contributor

@SergeyKanzhelev CHANGELOG entry is missing (but you that can be done in a follow up as well, in order to merge this change fast).

@SergeyKanzhelev
Copy link
Member

@bogdandrutu can you update the changelog?

@SergeyKanzhelev SergeyKanzhelev merged commit 14b5b6a into open-telemetry:master Aug 26, 2020
@bogdandrutu bogdandrutu deleted the baggage branch August 26, 2020 15:06
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
* Rename CorrelationContext to Baggage

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue priority:p3 Lowest priority level release:required-for-ga Must be resolved before GA release, or nice to have before GA spec:baggage Related to the specification/baggage directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename CorrelationContext to Baggage (again)
7 participants