Skip to content

Conversation

@bantonsson
Copy link
Contributor

@bantonsson bantonsson commented Nov 19, 2025

Changes

This adds 3 convenience methods to the Tracer trait that allows users to create, start, and enter a scope with an active Span with parent contexts and based on a SpanBuilder.

Right now, the easiest way to enter a Span is to use the convenience method on the tracer that only takes a name and then add tags to the span afterwards. This is problematic in the sense that samplers and processors that take attributes into account will not see these attributes at creation time.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@bantonsson bantonsson requested a review from a team as a code owner November 19, 2025 12:02
@bantonsson bantonsson self-assigned this Nov 19, 2025
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.9%. Comparing base (df412fe) to head (e0260b2).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3251     +/-   ##
=======================================
+ Coverage   80.8%   80.9%   +0.1%     
=======================================
  Files        129     129             
  Lines      23203   23372    +169     
=======================================
+ Hits       18750   18919    +169     
  Misses      4453    4453             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Looks good. lets add a changelog.md entry before merge.

@bantonsson bantonsson force-pushed the ban/span-builder-convenience branch 2 times, most recently from 9006373 to a6e09d5 Compare November 20, 2025 14:01
@bantonsson bantonsson force-pushed the ban/span-builder-convenience branch from a6e09d5 to e0260b2 Compare November 21, 2025 10:05
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.

2 participants