-
Notifications
You must be signed in to change notification settings - Fork 783
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
Make all test cases in W3C trace-context test suite pass #1668
Merged
cijothomas
merged 14 commits into
open-telemetry:master
from
xiang17:xiang17/FixingW3CTests
Jan 6, 2021
Merged
Make all test cases in W3C trace-context test suite pass #1668
cijothomas
merged 14 commits into
open-telemetry:master
from
xiang17:xiang17/FixingW3CTests
Jan 6, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1668 +/- ##
==========================================
+ Coverage 81.90% 82.12% +0.21%
==========================================
Files 245 245
Lines 6637 6706 +69
==========================================
+ Hits 5436 5507 +71
+ Misses 1201 1199 -2
|
…_length_limit (cherry picked from commit 5a2bd56c8f83b8e9094534084988992184f4fe7e)
(cherry picked from commit 4e23f9aec69c59affb27327e0a624b32a82317cc)
xiang17
commented
Dec 29, 2020
test/OpenTelemetry.Tests/Trace/Propagation/TraceContextPropagatorTest.cs
Outdated
Show resolved
Hide resolved
xiang17
changed the title
Fixing errors in W3CTraceContextTests
Make all test cases in W3C trace-context test suite pass
Dec 29, 2020
eddynaka
reviewed
Dec 29, 2020
src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs
Outdated
Show resolved
Hide resolved
eddynaka
reviewed
Dec 29, 2020
eddynaka
approved these changes
Dec 29, 2020
…t-1/ which has W3C Recommendation status.
CodeBlanch
reviewed
Jan 4, 2021
CodeBlanch
reviewed
Jan 4, 2021
src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs
Outdated
Show resolved
Hide resolved
CodeBlanch
reviewed
Jan 4, 2021
src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs
Outdated
Show resolved
Hide resolved
CodeBlanch
reviewed
Jan 4, 2021
src/OpenTelemetry.Api/Context/Propagation/TraceContextPropagator.cs
Outdated
Show resolved
Hide resolved
…ashSet.Add. Forbid upper case in traceparent string.
CodeBlanch
approved these changes
Jan 6, 2021
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.
LGTM
cijothomas
approved these changes
Jan 6, 2021
30 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed errors and failures (marked as "Fixed in this PR" below) in W3C Trace Context tests of #1219. (Tracking individual test case would be easier after merging PR #1243, which parses the test run result and identifies individual test case status.)
Note on key format
There is an inconsistency in Trace Context v1 between the expressions and the description in the note below.
Expressions:
Note:
I think the first expression has a bug and the key should start with
( lcalpha / DIGIT )
instead oflcalpha
to be consistent with the note of Trace Context v1 and the next version of specification being developed in w3c/trace-context repository.The same note has been added in code as inline comment (Ctrl+F for "inconsistency").
Note on vendor format
Trace Context v1 which has W3C Recommendation status differs from the next version of specification being developed in w3c/trace-context repository regarding the "tenant@vendor" rules, which are covered by the following two test cases in the python test code.
Here I implemented the rules in accordance with Trace Context v1 as following to pass the python test case.
test_tracestate_key_illegal_vendor_format
: The trace state is in such formattenant@vendor
. Neither tenant and vendor can be empty. There can be at most one@
. Otherwise remove all other list-members even if they are valid (in other words, remove all trace states).test_tracestate_key_length_limit
: The key can be up to 256 characters. Vendor up to 14. Tenant up to 241. Otherwise remove all trace states.Explanation on version number
Regarding the failing two cases on version number and generating new trace_id (
test_traceparent_version_0x00
andtest_traceparent_version_0xff
), the feature was working until a bug was introduced in this change.Summary of the failures in Netcoreapp 2.1
Errors:
test_tracestate_duplicated_keys
: Fixed in this PR.test_tracestate_key_illegal_characters
: Fixed in this PR.test_tracestate_key_illegal_vendor_format
: Fixed in this PR.test_tracestate_key_length_limit
: Fixed in this PR.test_tracestate_member_count_limit
: Fixed in this PR.test_tracestate_multiple_headers_different_keys
: Fixed in this PR.test_tracestate_value_illegal_characters
: Fixed in this PR.Failures:
test_traceparent_trace_flags_illegal_characters
: See issue Make all test cases in W3C trace-context test suite pass #1219.test_traceparent_version_0x00
: Fixed in this PR.test_traceparent_version_0xff
: Fixed in this PR.test_tracestate_empty_header
: Fixed in this PR.Summary of the failures in Netcoreapp 3.1
Errors:
test_tracestate_duplicated_keys
: Fixed in this PR.test_tracestate_key_illegal_characters
: Fixed in this PR.test_tracestate_key_illegal_vendor_format
: Fixed in this PR.test_tracestate_key_length_limit
: Fixed in this PR.test_tracestate_member_count_limit
: Fixed in this PR.test_tracestate_multiple_headers_different_keys
: Fixed in this PR.test_tracestate_value_illegal_characters
: Fixed in this PR.Failures:
test_traceparent_parent_id_all_zero
: See issue Make all test cases in W3C trace-context test suite pass #1219.test_traceparent_parent_id_illegal_characters
: See issue Make all test cases in W3C trace-context test suite pass #1219.test_traceparent_trace_flags_illegal_characters
: See issue Make all test cases in W3C trace-context test suite pass #1219.test_traceparent_version_0x00
: Fixed in this PR.test_traceparent_version_0xff
: Fixed in this PR.test_tracestate_empty_header
: Fixed in this PR.Summary of the failures in Netcoreapp 5.0
Errors:
Failures: