Skip to content

Commit 6b34ec4

Browse files
cursoragentclaude
andcommitted
fix(core): Check spanArguments.op before attributes for ignoreSpans
The _shouldIgnoreStreamedSpan function was only checking spanArguments.attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] for the op value, but at this point in the flow, the op lives on spanArguments.op (set by parseSentrySpanArguments which spreads StartSpanOptions). The SEMANTIC_ATTRIBUTE_SENTRY_OP attribute is only populated later when the SentrySpan constructor runs. This caused any ignoreSpans pattern that filters by op (e.g. { op: 'http.server' }) to silently fail to match in the core/browser streaming path. The OTel path correctly handles this by checking both: options.op || options.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP]. This fix aligns the core path with the OTel implementation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 6bca137 commit 6b34ec4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/tracing/trace.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ function _shouldIgnoreStreamedSpan(client: Client | undefined, spanArguments: Se
594594
}
595595

596596
return shouldIgnoreSpan(
597-
{ description: spanArguments.name || '', op: spanArguments.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] },
597+
{
598+
description: spanArguments.name || '',
599+
op: spanArguments.op || spanArguments.attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP],
600+
},
598601
ignoreSpans,
599602
);
600603
}

0 commit comments

Comments
 (0)