Skip to content

ref: Add span filtering to span first (15)#5633

Merged
sentrivana merged 104 commits intomasterfrom
ivana/span-first-15-ignore-spans
Mar 12, 2026
Merged

ref: Add span filtering to span first (15)#5633
sentrivana merged 104 commits intomasterfrom
ivana/span-first-15-ignore-spans

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Mar 11, 2026

In span first, we're introducing a new span filtering init option called ignore_spans which allows to ignore spans at start time based on name and attributes.

  • Spans ignored this way emit a new ignored client report (set via NoOpStreamedSpan.unsampled_reason).
  • If a segment matches one of the rules in ignore_spans, the whole span tree will be ignored. The implementation achieves this by allowing NoOpStreamedSpans to be set on the scope in this one single case, so that their children can easily determine their segment was dropped.
  • If a segment is not ignored but one of its children spans (regardless of depth) is, ONLY that one span will be ignored, not its whole subtree.

Spec: https://develop.sentry.dev/sdk/telemetry/spans/filtering/#filter-with-ignorespans

@sentrivana sentrivana changed the title ref: Add span filtering to span first ref: Add span filtering to span first (15) Mar 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

1 similar comment
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Codecov Results 📊

2159 passed | ⏭️ 115 skipped | Total: 2274 | Pass Rate: 94.94% | Execution Time: 5m 51s

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 11694 uncovered lines.

Files with missing lines (4)
File Patch % Lines
tracing_utils.py 83.98% ⚠️ 111 Missing and 40 partials
scope.py 92.58% ⚠️ 63 Missing and 41 partials
_types.py 76.67% ⚠️ 7 Missing and 1 partials
consts.py 99.16% ⚠️ 2 Missing

Generated by Codecov Action

@sentrivana sentrivana marked this pull request as ready for review March 11, 2026 10:34
@sentrivana sentrivana requested a review from a team as a code owner March 11, 2026 10:34
Base automatically changed from ivana/span-first-14-custom-sampling-context to master March 11, 2026 12:18
Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb 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, see one non-blocking suggestion

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@sentrivana sentrivana enabled auto-merge (squash) March 12, 2026 09:35
@sentrivana sentrivana merged commit 26db4dd into master Mar 12, 2026
155 of 159 checks passed
@sentrivana sentrivana deleted the ivana/span-first-15-ignore-spans branch March 12, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants