- 
                Notifications
    You must be signed in to change notification settings 
- Fork 15
fix: reject traceparent headers with unsupported versions #241
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
Conversation
This addresses a regression introduced in #178, where traceparent headers containing unsupported characters were not properly rejected and were incorrectly treated as valid. [APMAPI-1599]
caa04da    to
    32466a8      
    Compare
  
    | BenchmarksBenchmark execution time: 2025-09-22 08:45:07 Comparing candidate commit 071b25b in PR branch  Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics. | 
        
          
                test/test_tracer.cpp
              
                Outdated
          
        
      |  | ||
| { | ||
| __LINE__, | ||
| "malformed traceparent 1/x", | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this test would fit better in a previous test case, where you test error cases and assert that the expected_error_tag_value is malformed_traceparent. However this input would result in invalid_version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thank you @zacharycmontoya . Addressed in 071b25b
| Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main     #241      +/-   ##
==========================================
+ Coverage   87.45%   87.54%   +0.09%     
==========================================
  Files          83       83              
  Lines        5460     5468       +8     
==========================================
+ Hits         4775     4787      +12     
+ Misses        685      681       -4     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| 🎯 Code Coverage 🔗 Commit SHA: 071b25b | Docs | Was this helpful? Give us feedback! | 
Description
This addresses a regression introduced in #178, where traceparent headers containing unsupported characters were not properly rejected and were incorrectly treated as valid.
APMAPI-1599