Document IsFromUnhandledException/IsFromTerminalException API (.NET)#18676
Document IsFromUnhandledException/IsFromTerminalException API (.NET)#18676jamescrosswell wants to merge 3 commits into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| open Sentry | ||
| open System.Net.Http |
There was a problem hiding this comment.
TIL: F# has no implicit usings / opens
| open Sentry | ||
| open System.Net.Http | ||
|
|
||
| options.SetBeforeSend(fun sentryEvent hint -> |
There was a problem hiding this comment.
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.
DESCRIBE YOUR PR
Documents the new
SentryEvent.IsFromUnhandledException()andSentryEvent.IsFromTerminalException()extension methods (added in getsentry/sentry-dotnet#5177) so users can find them where they're most likely to be used — thebefore-sendfiltering docs.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.
sentry-dotnet v6.7.0SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: