Repository navigation
Breadcrumbs bypass IExceptionFilter, leaking filtered exception messages into later events #5514
Description
Activity
- addedBugSomething isn't workingSomething isn't working.NETPull requests that update .net codePull requests that update .net code
on Aug 27, 2026 It is possible to filter/process breadcrumbs before they are sent. But at this point we lost exception context and its type, forcing filtering by a string alone.
And speaking of that, Sentry Scrubbing doesn't have an option to scrub breadcrumbs as it seems - no $breadcrumb defined in the Source list. I tried to set
[Mask] [Usernames in filepaths] from [$breadcrumb]blindly, but it didn't seem to scrub anything.Hi @maxkatz6 - interesting problem. I'll do some digging to see it there is already an established way to avoid this in other SDKs.
Sentry Scrubbing doesn't have an option to scrub breadcrumbs as it seems - no $breadcrumb defined in the Source list.
Not sure I follow... what are you configuring where and what are you seeing vs what you expect?
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Aug 31, 2026 @maxkatz6 I've added a solution roughly based on what we do in the sentry-java SDK... there, they don't actually create breadcrumbs for all exceptions but they do when the exception gets captured via one of the logging integrations. In that scenario, they pass the log into the BeforeBreadcrumb callback as a Hint.
In sentry-dotnet we add breadcrumbs for exceptions regardless of whether these get captured via the logging API, by one of our integrations or whether you capture them manually. So for .NET I figured we could pass the Exception itself in to the callback as a Hint:
@jamescrosswell thanks. Yes,
BeforeBreadcrumbfiltration + exception hint works for me.Not sure I follow... what are you configuring where and what are you seeing vs what you expect?
I was talking about
https://****.sentry.io/settings/security-and-privacy/"Advanced Data Scrubbing" section. Doesn't seem to be possible to scrub breadcrumbs contents, unless I miss something. But it's not a .NET client issue.BeforeBreadcrumbfiltration + exception hint works for me.Cool, thanks for validating 👍🏻
https://****.sentry.io/settings/security-and-privacy/ "Advanced Data Scrubbing" section. Doesn't seem to be possible to scrub breadcrumbs contents
Aha, I see. Possibly something to raise with the core product team.
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Sep 1, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Package
Sentry
.NET Flavor
.NET
.NET Version
10.0.400
OS
Any (not platform specific)
OS Version
10.0
Development Environment
Rider 2025.x (Windows)
Other Error Monitoring Solution
No
Other Error Monitoring Solution Name
No response
SDK Version
6.9.0
Self-Hosted Sentry Version
No response
Workload Versions
UseSentry or SentrySdk.Init call
Steps to Reproduce
MyException.MyException- it's filtered out as expected.repro.zip
Expected Result
An exception dropped by an
IExceptionFilterleaves no trace.No breadcrumb carrying its message on subsequent events.
Actual Result
The later event carries a breadcrumb with the filtered exception's message: