Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added EnableNetworkEventBreadcrumbs to Native Android options #3267

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Features

- EnableNetworkEventBreadcrumbs can now be set on the Native Android options ([#3267](https://github.com/getsentry/sentry-dotnet/pull/3267))

### Fixes

- Fix missing exception StackTraces in some situations ([#3215](https://github.com/getsentry/sentry-dotnet/pull/3215))
Expand Down
2 changes: 2 additions & 0 deletions src/Sentry/Platforms/Android/BindableNativeSentryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class NativeOptions
public bool? EnableAppComponentBreadcrumbs { get; set; }
public bool? EnableAppLifecycleBreadcrumbs { get; set; }
public bool? EnableRootCheck { get; set; }
public bool? EnableNetworkEventBreadcrumbs { get; set; }
public bool? EnableSystemEventBreadcrumbs { get; set; }
public bool? EnableUserInteractionBreadcrumbs { get; set; }
public bool? EnableAutoActivityLifecycleTracing { get; set; }
Expand All @@ -44,6 +45,7 @@ public void ApplyTo(SentryOptions.NativeOptions options)
options.EnableAppComponentBreadcrumbs = EnableAppComponentBreadcrumbs ?? options.EnableAppComponentBreadcrumbs;
options.EnableAppLifecycleBreadcrumbs = EnableAppLifecycleBreadcrumbs ?? options.EnableAppLifecycleBreadcrumbs;
options.EnableRootCheck = EnableRootCheck ?? options.EnableRootCheck;
options.EnableNetworkEventBreadcrumbs = EnableNetworkEventBreadcrumbs ?? options.EnableNetworkEventBreadcrumbs;
options.EnableSystemEventBreadcrumbs = EnableSystemEventBreadcrumbs ?? options.EnableSystemEventBreadcrumbs;
options.EnableUserInteractionBreadcrumbs = EnableUserInteractionBreadcrumbs ?? options.EnableUserInteractionBreadcrumbs;
options.EnableAutoActivityLifecycleTracing = EnableAutoActivityLifecycleTracing ?? options.EnableAutoActivityLifecycleTracing;
Expand Down
9 changes: 9 additions & 0 deletions src/Sentry/Platforms/Android/NativeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ internal NativeOptions(SentryOptions options)
/// </summary>
public bool EnableRootCheck { get; set; } = true;

/// <summary>
/// Gets or sets a value that indicates if automatic breadcrumbs for network events are enabled.
/// The default value is <c>true</c> (enabled).
/// </summary>
/// <remarks>
/// See https://docs.sentry.io/platforms/android/enriching-events/breadcrumbs/
/// </remarks>
public bool EnableNetworkEventBreadcrumbs { get; set; } = true;

/// <summary>
/// Gets or sets a value that indicates if automatic breadcrumbs for system events are enabled.
/// The default value is <c>true</c> (enabled).
Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Platforms/Android/SentrySdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ private static void InitSentryAndroidSdk(SentryOptions options)
o.EnableAppLifecycleBreadcrumbs = options.Native.EnableAppLifecycleBreadcrumbs;
o.EnableRootCheck = options.Native.EnableRootCheck;
o.EnableSystemEventBreadcrumbs = options.Native.EnableSystemEventBreadcrumbs;
o.EnableNetworkEventBreadcrumbs = options.Native.EnableNetworkEventBreadcrumbs;
o.EnableUserInteractionBreadcrumbs = options.Native.EnableUserInteractionBreadcrumbs;
o.EnableUserInteractionTracing = options.Native.EnableUserInteractionTracing;

Expand Down
Loading