Skip to content

fix: Fix duplicate key error when using Kafka with DT enabled #2433

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
Apr 24, 2024

Conversation

chynesNR
Copy link
Member

There were actually two bugs when using Kafka with Distributed Tracing:

  • If headers were not present, we weren't creating them (due to a scoping error)
  • We were not checking to see if the keys already existed before adding them. This did not cause an immediate problem because the headers are kept in a list rather than a dictionary, but can cause a validation failure later.

The first bug kept us from finding the second problem in our integration tests. Both have been addressed.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (d9816fb) to head (cb76d94).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2433      +/-   ##
==========================================
- Coverage   81.44%   80.46%   -0.98%     
==========================================
  Files         406      450      +44     
  Lines       25063    27942    +2879     
  Branches     3023     3023              
==========================================
+ Hits        20412    22483    +2071     
- Misses       3877     4685     +808     
  Partials      774      774              
Flag Coverage Δ
Agent 81.44% <ø> (ø)
Profiler 71.93% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 46 files 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.

Good fix!

@tippmar-nr tippmar-nr enabled auto-merge (squash) April 24, 2024 13:23
@tippmar-nr tippmar-nr merged commit 6a85c03 into main Apr 24, 2024
77 of 78 checks passed
@tippmar-nr tippmar-nr deleted the fix/dt-with-kafka branch April 24, 2024 13:48
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.

4 participants