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

Return context with no Baggage if unable to extract #1685

Closed
MrAlias opened this issue Mar 10, 2021 · 1 comment · Fixed by open-telemetry/opentelemetry-specification#1575
Assignees
Labels
area:baggage Part of OpenTelemetry baggage area:context Part of OpenTelemetry context blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Mar 10, 2021

From the specification:

If the propagator is unable to parse the incoming baggage, extract MUST return a Context with no baggage entries in it.

Currently we do not clear the baggage from the parent context passed as an argument.

Similarly,

If the incoming baggage is present, but contains no entries, extract MUST return a Context with no baggage entries in it.

and we do not guarantee this:

if bVal == "" {
return parent
}

This would seem to be out of compliance with the specification. However, it does not seem like ideal behavior to clear valid existing baggage. This PR will determine if we need to clear existing baggage.

@MrAlias MrAlias added blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made release:required-for-ga labels Mar 10, 2021
@MrAlias MrAlias added this to the RC1 milestone Mar 10, 2021
@MrAlias MrAlias added area:baggage Part of OpenTelemetry baggage area:context Part of OpenTelemetry context and removed area:correlation-context labels Mar 12, 2021
@MrAlias
Copy link
Contributor Author

MrAlias commented Mar 23, 2021

The requirement that a context needs to be cleared of existing Baggage if it fails to extract/inject was a bug in the specification, it is specified more generally in the API Propagators specification that that behavior must not take place. Our implementation is compliant with the resolution specified in open-telemetry/opentelemetry-specification#1575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:baggage Part of OpenTelemetry baggage area:context Part of OpenTelemetry context blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant