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] Fix Tracer.StartRootSpan so that it always creates a root span #4890

Merged

Conversation

CodeBlanch
Copy link
Member

@CodeBlanch CodeBlanch commented Sep 26, 2023

Fixes #2803

Changes

  • Fix Tracer.StartRootSpan so that it creates a root span even if Activity.Current != null

Merge requirement checklist

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

@CodeBlanch CodeBlanch requested a review from a team as a code owner September 26, 2023 21:48
@CodeBlanch CodeBlanch added the pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package label Sep 26, 2023
@reyang
Copy link
Member

reyang commented Sep 26, 2023

Related to dotnet/runtime#65528.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #4890 (b447a51) into main (043272e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4890      +/-   ##
==========================================
- Coverage   82.94%   82.93%   -0.01%     
==========================================
  Files         294      294              
  Lines       12200    12206       +6     
==========================================
+ Hits        10119    10123       +4     
- Misses       2081     2083       +2     
Flag Coverage Δ
unittests 82.93% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/OpenTelemetry.Api/Trace/Tracer.cs 92.50% <100.00%> (+4.26%) ⬆️

... and 7 files with indirect coverage changes

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM

src/OpenTelemetry.Api/Trace/Tracer.cs Outdated Show resolved Hide resolved
@CodeBlanch CodeBlanch merged commit 23b041c into open-telemetry:main Sep 29, 2023
50 checks passed
@CodeBlanch CodeBlanch deleted the api-tracer-startrootspan-fix branch September 29, 2023 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry.Api Issues related to OpenTelemetry.Api NuGet package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start Root Span Collects Current Active Span as Parent
3 participants