-
Notifications
You must be signed in to change notification settings - Fork 648
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
Allow digit as first chr in vendor specific trace state key #511
Allow digit as first chr in vendor specific trace state key #511
Conversation
Codecov Report
@@ Coverage Diff @@
## master #511 +/- ##
=======================================
Coverage 89.47% 89.47%
=======================================
Files 43 43
Lines 2213 2213
Branches 250 250
=======================================
Hits 1980 1980
Misses 161 161
Partials 72 72
Continue to review full report at Codecov.
|
Hi @mariojonke, Shouldn't it be modified as well? Line 34 in f8179e4
Ideally a change like it should include a test to ensure we don't introduce a regression in the future. Maybe you want to create / modify one in https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py. |
i think the Regarding tests, i'll add some. |
@mariojonke you're right. Probably what is not aligned is the text there "Identifiers MUST begin with a lowercase letter or a digit". |
@@ -222,3 +222,32 @@ def test_tracestate_header_with_trailing_comma(self): | |||
) | |||
) | |||
self.assertEqual(span.get_context().trace_state["foo"], "1") | |||
|
|||
def test_tracestate_keys(self): | |||
"""Do not propagate invalid trace context. |
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.
Is this sentence the wrong one for this test?
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.
Besides the small nit on the tests docstring, LGTM!
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.
Great, thanks for the catch!
Allows vendor specific trace state keys to start with a digit as specified in: https://github.com/w3c/trace-context/blob/master/spec/20-http_header_format.md#key