Skip to content

Change default behavior to stop tracing 404s and other low-value responses unless explicitly enabled #4740

Description

@dingsdax

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions