Comments (6)
Hi, Thanks for opening this issue.
In your case, would you prefer to have an option that allows the SDK to disable the navigation breadcrumbs and you implement it on your side, or that we give you a callback where you decide what to ignore on the Appearing event?
from sentry-xamarin.
Disabling would be good too. I thought about having the ignore list, but I have some other custom navigation stuff that would be neat to add.
from sentry-xamarin.
You could also use BeforeBreadcrumb
to remove those programatically
from sentry-xamarin.
So we agreed to resolve this we can add an extension method RemoveNavigationPageIntegration
.
from sentry-xamarin.
I'm going to experiment with BeforeBreadcrumb
from sentry-xamarin.
Here's my workaround using BeforeBreadcrumb
options.BeforeBreadcrumb = breadcrumb =>
{
var output = AlwaysIgnorePage(breadcrumb, "LoadingOverlayPage");
output = IgnoreNavigationPage(output, "CustomNavigationPage");
return output;
};
private static Breadcrumb? AlwaysIgnorePage(Breadcrumb? breadcrumb, string pageName)
{
// not the breadcrumb we're interested in
if (breadcrumb is null) return breadcrumb;
if (breadcrumb.Type is null) return breadcrumb;
if (breadcrumb.Type != "navigation") return breadcrumb;
if (breadcrumb.Data is null) return breadcrumb;
return breadcrumb.Data["to"].Contains(pageName) ? null : breadcrumb;
}
private static string? _lastPageName;
private static Breadcrumb? IgnoreNavigationPage(Breadcrumb? breadcrumb, string pageName)
{
// not the breadcrumb we're interested in
if (breadcrumb is null) return breadcrumb;
if (breadcrumb.Type is null) return breadcrumb;
if (breadcrumb.Type != "navigation") return breadcrumb;
if (breadcrumb.Data is null) return breadcrumb;
if (breadcrumb.Data["to"].Contains(pageName))
{
_lastPageName = breadcrumb.Data["from"];
return null;
}
if (_lastPageName is null) return null;
var data = new Dictionary<string, string>()
{
{ "from", _lastPageName },
{ "to", breadcrumb.Data["to"] }
};
var replacementBreadcrumb = new Breadcrumb(
breadcrumb.Message!,
breadcrumb.Type, data,
breadcrumb.Category,
breadcrumb.Level);
_lastPageName = breadcrumb.Data["to"];
return replacementBreadcrumb;
}
from sentry-xamarin.
Related Issues (20)
- add app start instrumentation for xamarin (forms) HOT 6
- add Routing Instumentation for App Shell in Xamarin Forms HOT 1
- add Slow and Frozen Frames instrumentation for xamarin
- Documentation - change DSN to https://[email protected]/1234 HOT 2
- Discuss CancelationToken on FormsApplicationListener HOT 1
- System.AggregateException from Sentry assembly in Xamarin.Droid app HOT 8
- Update to [email protected] with Forms??? HOT 3
- Crash on Self Hosted. HOT 1
- Sentry.Xamarin 1.4.2 gives error when compiling against net6.0-android project HOT 2
- Unhandled Exception : System.IO.IOException: Sharing violation on path ..../Sentry/xxxxx.envelope HOT 7
- Sentry does not work in XamarinForms.iOS apps HOT 8
- SDK doesn't allow you to overwrite the release option
- Line numbers for Android HOT 7
- 1.5+ Breaks using Sentry 3.31 or higher HOT 6
- System.MissingMethodException: Method not found HOT 6
- Streamline and align the "Getting Started" docs to fit in the new structure HOT 1
- [Android] System.NullReferenceException - RequestedThemeChanged HOT 2
- iOS ITMS-91053: Missing API declaration HOT 8
- 'Xamarin.Essentials.NotImplementedInReferenceAssemblyException' despite direct reference HOT 7
- XALNK7000: Mono.Linker.MarkException Sentry.SentryXamarinOptionsExtensions::RegisterXamarinEventProcessors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-xamarin.