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

datadog: do not add None tracestate value. #368

Merged

Conversation

toumorokoshi
Copy link
Member

@toumorokoshi toumorokoshi commented Mar 10, 2021

Description

The datadog exporter sometimes attempts to add a "None" value to the TraceState, if the
datadog origin header doesn't exist.

This does not cause runtime errors in the most recent opentelemetry
release (tracestate protects against an invalid value), but does cause warnings:

WARNING opentelemetry.trace.span:span.py:230 Invalid key/value pair (dd_origin, None) found.

Fixes #262 (comment)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The existing tests suffice to verify my change didn't affect behavior, aside from the warning.

I was thinking of adding a log.capture test, but thought it would be overkill.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

The datadog exporter sometimes attempts to add a "None" value, if the
datadog origin header doesn't exist.

This does not cause runtime errors in the most recent opentelemetry
release (tracestate protects against an invalid value), but does cause warnings:

WARNING  opentelemetry.trace.span:span.py:230 Invalid key/value pair (dd_origin, None) found.
@toumorokoshi toumorokoshi requested review from a team, codeboten and ocelotl and removed request for a team March 10, 2021 06:55
@codeboten codeboten merged commit 2d9df10 into open-telemetry:main Mar 11, 2021
@alertedsnake
Copy link
Contributor

Shouldn't there have been a test included in this like I had in #272 ?

@toumorokoshi
Copy link
Member Author

Shouldn't there have been a test included in this like I had in #272 ?

The fix is a little different here, and really just removes a log warning. It felt excessive to test whether log warnings occur or not.

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.

gRPC client + botocore + datadog exporter instrumentation error
4 participants