Skip to content

Pass OTLP metadata as tuple instead of string#1507

Merged
codeboten merged 5 commits intoopen-telemetry:masterfrom
codeboten:fix-headers
Jan 7, 2021
Merged

Pass OTLP metadata as tuple instead of string#1507
codeboten merged 5 commits intoopen-telemetry:masterfrom
codeboten:fix-headers

Conversation

@codeboten
Copy link
Copy Markdown
Contributor

Description

The header data was previously passed in as a string, this was incorrect according to the definition of metadata in gRPC.

Fixes #1506

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

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

@codeboten codeboten requested review from a team, aabmass and toumorokoshi and removed request for a team January 4, 2021 17:16
insecure = False

self._headers = headers or Configuration().EXPORTER_OTLP_HEADERS
if isinstance(self._headers, str):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason we are changing from : to = delimiters? No opinion, just curious. Also, once we have a place where all the env vars are documented, this specific format should probably be outlined.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@codeboten codeboten merged commit eb7125d into open-telemetry:master Jan 7, 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.

OTLP metadata must be set as tuple

3 participants