Skip to content

Make propagators conform to spec#1811

Merged
codeboten merged 6 commits intoopen-telemetry:mainfrom
mariojonke:propagator-extract-ctxt
May 8, 2021
Merged

Make propagators conform to spec#1811
codeboten merged 6 commits intoopen-telemetry:mainfrom
mariojonke:propagator-extract-ctxt

Conversation

@mariojonke
Copy link
Copy Markdown
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 review from a team, hectorhdzg and owais 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