fix: reject traceparent headers with unsupported versions#241
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.
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.
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