You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much of the behavior of the ASP.NET Core integration with Sentry can be customized by using the frameworks dependency injection system. That is done by registering your own implementation of some of the exposed abstraction.
You can combine this integration with a logging library like `log4net`, `NLog`, or `Serilog` to include both request data as well as your logs as breadcrumbs. The logging ingrations also capture events when an error is logged.
30
30
31
-
###Configure
31
+
## Configure
32
32
33
33
All `ASP.NET Core` configurations are valid here. But one configuration in particular is relevant.
34
34
@@ -62,6 +62,12 @@ public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFu
62
62
63
63
Check out the [Sentry ASP.NET Core](/platforms/dotnet/guides/aspnetcore/) documentation for the complete set of options.
64
64
65
+
## Verify
66
+
67
+
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
- This [integration with Blazor WebAssembly](https://github.com/getsentry/sentry-dotnet/tree/main/samples/Sentry.Samples.AspNetCore.Blazor.Wasm) sample demonstrates using Sentry with Blazor WebAssembly. (**C#**)
Check out a complete working [sample](https://github.com/getsentry/sentry-dotnet-ef/tree/master/samples/Sentry.Samples.AspNet.Mvc) to see it in action.
Copy file name to clipboardExpand all lines: docs/platforms/dotnet/guides/google-cloud-functions/index.mdx
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,11 +153,17 @@ public class UserFactoryStartup : FunctionsStartup
153
153
}
154
154
```
155
155
156
-
## Options & Initialization
156
+
###Options & Initialization
157
157
158
158
As previously mentioned, this package is a wrapper around [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/), [Sentry.AspNetCore](/platforms/dotnet/guides/aspnetcore/) and [Sentry](/platforms/dotnet/). Please refer to the documentation of these packages to get the options that are defined at those levels.
159
159
160
-
### Samples
160
+
## Verify
161
+
162
+
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
Copy file name to clipboardExpand all lines: docs/platforms/dotnet/guides/log4net/index.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,13 @@ Also in the example above, you can find the DSN being set. That will instruct th
55
55
This is only one of the ways to initialize the SDK. If you wish to configure the SDK programatically, you could **leave the DSN out** from the appender configuration section. The SDK needs to be initialized only **once** and since other integrations (like ASP.NET) are also able to initialize the SDK, you only need to pass the DSN to one of these integrations.
56
56
One common case to not add the DSN to the XML configuration file (which would initialize it via the log4net integration) is to have full access to the [SDK option](/platforms/dotnet/guides/log4net/configuration/options/).
57
57
58
-
### Sample
58
+
## Verify
59
+
60
+
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
For a [sample app.config](https://github.com/getsentry/sentry-dotnet/blob/main/samples/Sentry.Samples.Log4Net/app.config) or a complete working [sample](https://github.com/getsentry/sentry-dotnet/tree/main/samples/Sentry.Samples.Log4Net) to see it in action.
This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/). This means that besides the MAUI related features, through this package you'll also get access to all the framework's logging integration and also the features available in the main [Sentry](/platforms/dotnet/) SDK.
42
42
43
-
###Configure
43
+
## Configure
44
44
45
45
In your `MauiProgram.cs` file, call `UseSentry` on your `MauiAppBuilder`, and include any options you would like to set. The `Dsn` is the only required parameter.
46
46
@@ -78,13 +78,13 @@ public static MauiApp CreateMauiApp()
78
78
}
79
79
```
80
80
81
-
## Options
81
+
###Options
82
82
83
83
As previously mentioned, this package is a wrapper around [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/) and [Sentry](/platforms/dotnet/). Please refer to the documentation of these packages to get the options that are defined at those levels.
84
84
85
85
Below, the options that are specific to `Sentry.Maui` will be described.
86
86
87
-
### IncludeTextInBreadcrumbs
87
+
####IncludeTextInBreadcrumbs
88
88
89
89
This option controls whether elements that implement the `IText` interface (such as `Button`, `Label`, `Entry`, and others) will have their text included on breadcrumbs. This option is disabled by default.
90
90
@@ -94,7 +94,7 @@ Use caution when enabling, as such values may contain personally identifiable in
94
94
95
95
</Alert>
96
96
97
-
### IncludeTitleInBreadcrumbs
97
+
####IncludeTitleInBreadcrumbs
98
98
99
99
This option contols whether elements that implement the `ITitledElement` interface (such as `Window`, `Page`, and others) will have their titles included on breadcrumbs. This option is disabled by default.
100
100
@@ -104,7 +104,7 @@ Use caution when enabling, as such values may contain personally identifiable in
104
104
105
105
</Alert>
106
106
107
-
### IncludeBackgroundingStateInBreadcrumbs
107
+
####IncludeBackgroundingStateInBreadcrumbs
108
108
109
109
Controls whether the breadcrumb sent for the `Window.Backgrounding` event will include state data from `BackgroundingEventArgs.State`. This option is disabled by default.
110
110
@@ -113,3 +113,9 @@ Controls whether the breadcrumb sent for the `Window.Backgrounding` event will i
113
113
Use caution when enabling, as such values may contain personally identifiable information (PII).
114
114
115
115
</Alert>
116
+
117
+
## Verify
118
+
119
+
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
0 commit comments