Skip to content

Windows verify

5c17c82
Select commit
Loading
Failed to load commit list.
Merged

feat: Add option to exclude certain HTTP statuses from tracing #5034

Windows verify
5c17c82
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Mar 17, 2026 in 14m 1s

1 issue

find-bugs: Found 1 issue (1 high)

High

TraceIgnoreStatusCodeTransactionProcessor will never filter transactions in ASP.NET Core - `src/Sentry/Internal/TraceIgnoreStatusCodeTransactionProcessor.cs:22-27`

The processor reads transaction.Data to find the HTTP status code, but this data is never populated when transactions come from ASP.NET Core. The SentryTracingMiddleware calls SetExtra/SetData on TransactionTracer._data, but when SentryTransaction is created from the tracer, it only copies Contexts.Trace.Data (which is a separate empty dictionary). The unit tests pass because they call SetData directly on SentryTransaction, bypassing the real code path.


Duration: 14m · Tokens: 5.8M in / 27.3k out · Cost: $6.35 (+extraction: $0.00)

Annotations

Check failure on line 27 in src/Sentry/Internal/TraceIgnoreStatusCodeTransactionProcessor.cs

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: find-bugs

TraceIgnoreStatusCodeTransactionProcessor will never filter transactions in ASP.NET Core

The processor reads `transaction.Data` to find the HTTP status code, but this data is never populated when transactions come from ASP.NET Core. The SentryTracingMiddleware calls `SetExtra`/`SetData` on `TransactionTracer._data`, but when `SentryTransaction` is created from the tracer, it only copies `Contexts.Trace.Data` (which is a separate empty dictionary). The unit tests pass because they call `SetData` directly on `SentryTransaction`, bypassing the real code path.