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

Prevent duplicate DT headers for grpc #1783

Merged
merged 8 commits into from Mar 6, 2024
Merged

Conversation

kanderson250
Copy link
Contributor

@kanderson250 kanderson250 commented Mar 5, 2024

Resolves #1768

This PR addresses a bug with grpc apps using distributed tracing. Previously our grpc instrumentation allowed duplicate DT headers, which caused DT payloads to be rejected by downstream services. This is now prohibited.

Changes:

  • Prevent adding duplicate headers in all grpc instrumentation modules
  • Allow parsing of duplicate (same value) parent headers in W3CTraceParentParser. Also add a log message when this happens to help diagnose the issue should it recur.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.83%. Comparing base (a84c048) to head (c5ff850).
Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1783   +/-   ##
=========================================
  Coverage     70.82%   70.83%           
- Complexity     9934     9946   +12     
=========================================
  Files           825      826    +1     
  Lines         39826    39875   +49     
  Branches       6037     6043    +6     
=========================================
+ Hits          28207    28245   +38     
- Misses         8891     8903   +12     
+ Partials       2728     2727    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kanderson250 kanderson250 merged commit 6063816 into main Mar 6, 2024
104 checks passed
@kanderson250 kanderson250 deleted the bug-grpc-duplicate-headers branch March 6, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Prevent duplicate DT headers for grpc
4 participants