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

Make propagators conform to spec #1811

Merged
merged 6 commits into from
May 8, 2021

Conversation

mariojonke
Copy link
Contributor

@mariojonke mariojonke commented May 4, 2021

Description

Propagators use the root context as default value for the extract operation. Additionally avoid modifying the context in case there is nothing to extract or the carrier does not hold valid data.

Fixes #1765

Fixes also an issue in the jaeger propagator where trace/span id validity was comparing str with int values.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (behavioral change since root context is now the default value for extract)

How Has This Been Tested?

additional unit tests have been added

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

* do not modify / set an invalid span in the passed context in case
  a propagator did not manage to extract
* in case no context is passed to propagator.extract assume the root
  context as default so that a new trace is started instead of continung
  the current active trace in case extraction fails
* fix also jaeger propagator which compared int with str trace/span ids
  when checking for validity in extract
@mariojonke mariojonke requested a review from a team as a code owner May 4, 2021 15:01
@mariojonke mariojonke requested review from owais and hectorhdzg and removed request for a team May 4, 2021 15:01
@codeboten codeboten changed the title Make propagatros conform to spec Make propagators conform to spec May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagators must not return an invalid span if nothing could be extracted from the carrier
5 participants