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

Fix: Prevent broken traces when HttpClient content headers contain tracing headers. (#1843) #1888

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

nrcventura
Copy link
Member

@nrcventura nrcventura commented Sep 6, 2023

Thank you for submitting a pull request. Please review our contributing guidelines and code of conduct.

Description

Fixes #1843.

Prevents duplicate outgoing tracing headers, for HttpClient calls, by ensuring that the headers are only present as request headers, and that they do not also appear as content headers. An existing Integration Test was updated to ensure that the distributed trace is not broken when tracing headers are part of the Content Headers collection.

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

@codecov-commenter
Copy link

Codecov Report

Merging #1888 (a940b3e) into main (737b4f1) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1888      +/-   ##
==========================================
- Coverage   83.49%   83.48%   -0.01%     
==========================================
  Files         402      402              
  Lines       24670    24670              
==========================================
- Hits        20597    20596       -1     
- Misses       4073     4074       +1     

see 1 file with indirect coverage changes

Copy link
Member

@tippmar-nr tippmar-nr left a comment

Choose a reason for hiding this comment

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

Nicely done!

@nrcventura nrcventura merged commit 541dd2c into main Sep 7, 2023
77 checks passed
@nrcventura nrcventura deleted the fix/improve-content-header-handling branch September 7, 2023 15:54
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.

HttpClient instrumentation does not handle case when tracing headers are content headers
4 participants