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

set TraceState field in OTLP Exporter #4331

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

Yun-Ting
Copy link
Contributor

@Yun-Ting Yun-Ting commented Mar 24, 2023

Fixes #4010

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes

@Yun-Ting Yun-Ting changed the title set tracestate field in OTLP Exporter set TraceState field in OTLP Exporter Mar 24, 2023
@Yun-Ting Yun-Ting marked this pull request as ready for review March 24, 2023 19:14
@Yun-Ting Yun-Ting requested a review from a team March 24, 2023 19:14
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #4331 (afa7cf0) into main (094124e) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4331      +/-   ##
==========================================
- Coverage   84.67%   84.64%   -0.04%     
==========================================
  Files         298      298              
  Lines       11936    11937       +1     
==========================================
- Hits        10107    10104       -3     
- Misses       1829     1833       +4     
Impacted Files Coverage Δ
...metryProtocol/Implementation/ActivityExtensions.cs 95.93% <100.00%> (+0.02%) ⬆️

... and 4 files with indirect coverage changes

[Theory]
[InlineData(true)]
[InlineData(false)]
public void ToOtlpSpanTraceStateTest(bool traceStateWasSet)
Copy link
Member

Choose a reason for hiding this comment

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

do we have existing tests for checking other things from activity context? like spanid,traceid etc? we could just modify it instead of adding dedicated tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add traceState assertions to ToOtlpSpanTest.
Personally, I prefer to keep unit tests small.

@utpilla utpilla merged commit 27560f6 into open-telemetry:main Mar 27, 2023
@Yun-Ting Yun-Ting deleted the yunl/traceState branch March 28, 2023 22:43
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.

OTLP Exporter does not set trace_state field
5 participants