-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(span-first): Clarify ignoreSpans must be evaluated before span starts
#16150
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
Conversation
Add implementation requirement specifying that ignoreSpans patterns must be evaluated before the span is started to ensure ignored spans are never created and avoid unnecessary overhead. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
ignoreSpans must be evaluated before span starts
Clarified implementation requirements for span filtering, including evaluation order and matching rules for attributes.
Clarified implementation requirements for ignoring spans in telemetry.
Lms24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
coolguyzone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
| 1. The `ignoreSpans` patterns MUST be evaluated **before** the span is started. | ||
| 2. The `ignoreSpans` patterns MUST be applied to all spans, including the root or segment span. | ||
| - If a pattern matches the root span, the span and all its children MUST be ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The documentation requires ignoreSpans to be evaluated before a span starts, but provides examples that filter on attributes like http.status_code, which are only available after.
Severity: MEDIUM
Suggested Fix
Re-evaluate the ignoreSpans requirement. Either remove the strict "MUST be evaluated before the span is started" clause, or update the examples to only use attributes available at span creation. Alternatively, explicitly state that filtering on post-start attributes is not supported, or specify a multi-stage filtering process if it is intended to be supported.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: develop-docs/sdk/telemetry/spans/filtering.mdx#L82-L84
Potential issue: The documentation introduces a logical contradiction by requiring
`ignoreSpans` patterns to be evaluated before a span starts, while simultaneously
providing examples that filter on attributes only available after a span completes, such
as `http.status_code`. This creates an impossible implementation scenario for SDK
developers, forcing them to either ignore the new strict requirement or fail to support
the documented examples. This ambiguity will likely lead to inconsistent filtering
behavior across different SDKs, undermining the goal of a unified specification.
Did we get this right? 👍 / 👎 to inform future reviews.
Summary
ignoreSpanspatterns must be evaluated before the span is started🤖 Generated with Claude Code