Skip to content

ddtrace/tracer: fix traceparent length check #1815

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

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Conversation

ahmed-mez
Copy link
Contributor

What does this PR do?

Align the W3C trace context parsing with the RFC:

  • traceparent header with version > 0 can be longer than 55 characters if str[55]=="-"
  • The length of traceparent header with version == 0 has to be 55

Motivation

Fixes test_headers_tracecontext.py::test_traceparent_version_0xcc in system tests.

Describe how to test/QA your changes

test_headers_tracecontext.py::test_traceparent_version_0xcc passes in system-tests

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Changed code has unit tests for its functionality.
  • If this interacts with the agent in a new way, a system test has been added.

Sorry, something went wrong.

@ahmed-mez ahmed-mez force-pushed the ahmed/fix-traceparent branch from 7f5730d to 5f7afeb Compare March 21, 2023 11:11
@pr-commenter
Copy link

pr-commenter bot commented Mar 21, 2023

Benchmarks

Comparing candidate commit 5f7afeb in PR branch ahmed/fix-traceparent with baseline commit 53225b6 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 18 metrics, 0 unstable metrics.

@ahmed-mez ahmed-mez merged commit 96788d9 into main Mar 21, 2023
@ahmed-mez ahmed-mez deleted the ahmed/fix-traceparent branch March 21, 2023 12:59
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.

None yet

2 participants