Skip to content

Commit 3710065

Browse files
Review feedback
1 parent 6c4e3f8 commit 3710065

File tree

2 files changed

+13
-23
lines changed

2 files changed

+13
-23
lines changed

docs/platforms/dotnet/guides/android/index.mdx

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Sentry supports [.NET for Android](https://learn.microsoft.com/dotnet/android/ge
2525
Add the Sentry dependency to your .NET for Android application:
2626

2727
```shell {tabTitle:.NET Core CLI}
28-
dotnet add package Sentry.Maui -v {{@inject packages.version('sentry.dotnet') }}
28+
dotnet add package Sentry -v {{@inject packages.version('sentry.dotnet') }}
2929
```
3030

3131
```powershell {tabTitle:Package Manager}
32-
Install-Package Sentry.Maui -Version {{@inject packages.version('sentry.dotnet') }}
32+
Install-Package Sentry -Version {{@inject packages.version('sentry.dotnet') }}
3333
```
3434

3535
## Configure
@@ -47,6 +47,10 @@ public class MainActivity : Activity
4747
{
4848
options.Dsn = "___PUBLIC_DSN___";
4949
options.SendDefaultPii = true; // adds the user's IP address automatically
50+
#if DEBUG
51+
// Log debug information about the Sentry SDK
52+
options.Debug = true;
53+
#endif
5054

5155
// Android specific .NET features are under the Android properties:
5256
options.Android.LogCatIntegration = LogCatIntegrationType.Errors; // Get logcat logs for both handled and unhandled errors; default is unhandled only
@@ -67,32 +71,14 @@ public class MainActivity : Activity
6771
{
6872
if (evt.Exception?.Message.Contains("Something you don't care want logged?") ?? false)
6973
{
70-
// return null to filter out an event
71-
return null;
74+
return null; // return null to filter out event
7275
}
7376
// or add additional data
7477
evt.SetTag("dotnet-Android-Native-Before", "Hello World");
7578
return evt;
7679
});
7780
});
7881

79-
// Here's an example of adding custom scope information.
80-
// This can be done at any time, and will be passed through to the Native Android SDK as well.
81-
SentrySdk.ConfigureScope(scope =>
82-
{
83-
scope.AddBreadcrumb("Custom Breadcrumb");
84-
scope.SetExtra("Test", "Custom Extra Data");
85-
scope.User = new SentryUser
86-
{
87-
Username = "SomeUser",
88-
Email = "[email protected]",
89-
Other =
90-
{
91-
["CustomInfo"] = "Custom User Info"
92-
}
93-
};
94-
});
95-
9682
base.OnCreate(savedInstanceState);
9783
}
9884
}

docs/platforms/dotnet/guides/apple/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Sentry supports [.NET for iOS, macOS, and Mac Catalyst](https://learn.microsoft.
2222
Add the Sentry dependency to your .NET for iOS, macOS, and/or Mac Catalyst application:
2323

2424
```shell {tabTitle:.NET Core CLI}
25-
dotnet add package Sentry.Maui -v {{@inject packages.version('sentry.dotnet') }}
25+
dotnet add package Sentry -v {{@inject packages.version('sentry.dotnet') }}
2626
```
2727

2828
```powershell {tabTitle:Package Manager}
29-
Install-Package Sentry.Maui -Version {{@inject packages.version('sentry.dotnet') }}
29+
Install-Package Sentry -Version {{@inject packages.version('sentry.dotnet') }}
3030
```
3131

3232
## Configure
@@ -44,7 +44,11 @@ public class AppDelegate : UIApplicationDelegate
4444
SentrySdk.Init(options =>
4545
{
4646
options.Dsn = "___PUBLIC_DSN___";
47+
options.SendDefaultPii = true; // adds the user's IP address automatically
48+
#if DEBUG
49+
// Log debug information about the Sentry SDK
4750
options.Debug = true;
51+
#endif
4852

4953
// All the native iOS SDK options are available below
5054
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/

0 commit comments

Comments
 (0)