Change the default for SentryOptions.TraceIgnoreStatusCodes from an empty collection to:
[301, (305, 399), (401, 404)]
This matches sentry-ruby's default. It is the SDK spec's recommended value minus 302/303, which ASP.NET MVC, Razor Pages and minimal APIs use to redirect after a successful form POST (see the framework disclaimer added in getsentry/sentry-docs#19658).
With that default, the SDK stops tracing incoming requests that end in an infrastructure redirect (e.g. HTTPS redirection, rewrite rules) or in a 401–404 response. Those transactions are rarely useful for debugging, are often triggered by scanning bots, and use up span quota.
- Default matches sentry-ruby
- Breaking change noted in release notes + migration path documented
See also
Change the default for
SentryOptions.TraceIgnoreStatusCodesfrom an empty collection to:This matches sentry-ruby's default. It is the SDK spec's recommended value minus 302/303, which ASP.NET MVC, Razor Pages and minimal APIs use to redirect after a successful form POST (see the framework disclaimer added in getsentry/sentry-docs#19658).
With that default, the SDK stops tracing incoming requests that end in an infrastructure redirect (e.g. HTTPS redirection, rewrite rules) or in a 401–404 response. Those transactions are rarely useful for debugging, are often triggered by scanning bots, and use up span quota.
See also