Skip to content

Document IsFromUnhandledException/IsFromTerminalException API (.NET)#18676

Open
jamescrosswell wants to merge 3 commits into
masterfrom
jamescrosswell/document-unhandled-exception-api-5348
Open

Document IsFromUnhandledException/IsFromTerminalException API (.NET)#18676
jamescrosswell wants to merge 3 commits into
masterfrom
jamescrosswell/document-unhandled-exception-api-5348

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

DESCRIBE YOUR PR

Documents the new SentryEvent.IsFromUnhandledException() and SentryEvent.IsFromTerminalException() extension methods (added in getsentry/sentry-dotnet#5177) so users can find them where they're most likely to be used — the before-send filtering docs.

  • Adds a "Filtering by Unhandled or Terminal Exceptions" subsection under Using before-send in the .NET filtering docs
  • Explains the difference between unhandled and terminal exceptions
  • Provides C# and F# examples for filtering handled exceptions while always sending unhandled ones

Closes getsentry/sentry-dotnet#5348

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline: Release of sentry-dotnet v6.7.0
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Adds a subsection under the .NET before-send filtering docs covering the
new SentryEvent extension methods introduced in sentry-dotnet#5177, with
C# and F# examples showing how to filter by handled/unhandled/terminal
status.

Closes getsentry/sentry-dotnet#5348

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jul 9, 2026 2:00am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jul 9, 2026 2:00am

Request Review

Comment thread docs/platforms/dotnet/common/configuration/filtering.mdx Outdated
Comment thread docs/platforms/dotnet/common/configuration/filtering.mdx Outdated
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
@jamescrosswell jamescrosswell requested a review from Flash0ver July 9, 2026 01:35
@jamescrosswell jamescrosswell marked this pull request as ready for review July 9, 2026 01:35
Comment thread docs/platforms/dotnet/common/configuration/filtering.mdx
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@Flash0ver Flash0ver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit-picky suggestion/question.
Merge after release of sentry-dotnet v6.7.0.

Comment on lines +54 to +55
open Sentry
open System.Net.Http

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: F# has no implicit usings / opens

open Sentry
open System.Net.Http

options.SetBeforeSend(fun sentryEvent hint ->

@Flash0ver Flash0ver Jul 9, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question/suggestion: consistency of delegate parameter names with example above

Here, the F# parameters sentryEvent hint are consistent with the C# code (sentryEvent, hint).

But in the example above: "Using BeforeSend", the C# code also uses (sentryEvent, hint) (so we are consistent there) ... but the F# code uses fun event hint -> (where we are not consistent).

I believe using "sentryEvent" here is OK, but perhaps we might want to rename the existing F# sample to "sentryEvent" rather than just "event", too. Considering https://learn.microsoft.com/dotnet/fsharp/language-reference/keyword-reference which documents that event is "a token that is reserved as keyword for future expansion of F#".

But to be fair ... the inconsistency of sentryEvent vs the above event is definitely nit-picky ... and not directly related to THIS changeset.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document API for checking unhandled exceptions

2 participants