Skip to content
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

[API] Comply with W3C Trace Context #3115

Merged
merged 34 commits into from
Nov 6, 2024

Conversation

psx95
Copy link
Contributor

@psx95 psx95 commented Oct 30, 2024

Fixes #74

Changes

  • Fixes the listed failures in w3c trace-context compliance test suite.
  • Adds a CI check which runs the w3c trace context tests for SPEC_LEVEL=1.
    • Test suites run are TraceContextTest & AdvancedTest.

Details

The following lists shows all the failing tests. Checked box indicates that the changes in this PR have fixed the test.

Currently failing tests from TraceContextTest suite

  • test_traceparent_header_name_valid_casing
  • test_traceparent_included_tracestate_missing
  • test_traceparent_ows_handling
  • test_traceparent_version_0xcc
  • test_tracestate_all_allowed_characters
  • test_tracestate_duplicated_keys
  • test_tracestate_empty_header
  • test_tracestate_header_name_valid_casing
  • test_tracestate_included_traceparent_included
  • test_tracestate_key_length_limit
  • test_tracestate_member_count_limit
  • test_tracestate_multiple_headers_different_keys
  • test_tracestate_ows_handling

Currently failing tests from AdvancedTest suite

  • test_multiple_requests_with_valid_traceparent

NOTE: The tests above were part of test suites TraceContextTest & AdvancedTest. These test suites Trace Context Level 1 support.

Current Status

All tests now passing. Test suites ran - TraceContextTest & AdvancedTest.

Additional Tasks

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Copy link

netlify bot commented Oct 30, 2024

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 894c042
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/672b9015a2c39800089ba6cf

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.83%. Comparing base (497eaf4) to head (894c042).
Report is 154 commits behind head on main.

Files with missing lines Patch % Lines
...entelemetry/trace/propagation/http_trace_context.h 62.50% 3 Missing ⚠️
api/include/opentelemetry/trace/trace_state.h 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3115      +/-   ##
==========================================
+ Coverage   87.12%   87.83%   +0.72%     
==========================================
  Files         200      195       -5     
  Lines        6109     6138      +29     
==========================================
+ Hits         5322     5391      +69     
+ Misses        787      747      -40     
Files with missing lines Coverage Δ
api/include/opentelemetry/common/string_util.h 100.00% <100.00%> (ø)
api/include/opentelemetry/trace/trace_state.h 97.60% <0.00%> (ø)
...entelemetry/trace/propagation/http_trace_context.h 92.76% <62.50%> (-2.83%) ⬇️

... and 99 files with indirect coverage changes

@psx95 psx95 force-pushed the w3c-trace-context branch 9 times, most recently from 3759a7c to 39e58f1 Compare November 1, 2024 15:47
@psx95 psx95 requested a review from a team as a code owner November 1, 2024 23:14
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

Please check the PR comments, it seems entry for test_traceparent_header_name_valid_casing is duplicated.

See also minor comments.

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fixes.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit comments. Thanks for working on this.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
ci/do_ci.sh Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@marcalff marcalff changed the title [TEST] Fix failing W3C Trace Context compliance tests [API] Comply with W3C Trace Context Nov 6, 2024
@marcalff marcalff merged commit be1f43c into open-telemetry:main Nov 6, 2024
56 checks passed
malkia added a commit to malkia/opentelemetry-cpp that referenced this pull request Nov 6, 2024
@psx95 psx95 deleted the w3c-trace-context branch November 7, 2024 02:13
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.

W3C TraceContext compliance
4 participants