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
description: "Learn about Sentry's .NET integration with Azure Functions."
5
5
---
6
6
7
-
Sentry provides an integration with Azure Functions through the [Sentry.Azure.Functions.Worker NuGet package](https://www.nuget.org/packages/Sentry.Azure.Functions.Worker).
8
-
All triggers are supported.
7
+
Sentry provides an integration with Azure Functions through the [Sentry.Extensions.Logging](https://www.nuget.org/packages/Sentry.Extensions.Logging) and [Sentry.OpenTelemetry](https://www.nuget.org/packages/Sentry.OpenTelemetry) NuGet packages.
9
8
10
9
## Features
11
10
@@ -17,71 +16,76 @@ Select which Sentry features you'd like to install in addition to Error Monitori
This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/). This means that besides the Azure Functions related features, through this package you'll also get access to the `ILogger<T>` integration and also the features available in the main[Sentry](/platforms/dotnet/) SDK.
39
+
The [Sentry.Extensions.Logging](/platforms/dotnet/guides/extensions-logging/)package also provides access to the `ILogger<T>` integration and the other core features available in the [Sentry](/platforms/dotnet/) SDK.
31
40
32
41
## Configure
33
42
34
-
Sentry integration with Azure Functions is done by calling `.UseSentry()` and specifying the options, for example:
43
+
The core features of Sentry are enabled by calling `AddSentry` when configuring logging.
// When configuring for the first time, to see what the SDK is doing:
45
-
options.Debug=true;
46
-
// Adds request URL and headers, IP and name for users, etc.
47
-
options.SendDefaultPii=true;
48
-
// ___PRODUCT_OPTION_START___ performance
49
-
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
50
-
// We recommend adjusting this value in production.
51
-
options.TracesSampleRate=1.0;
52
-
// ___PRODUCT_OPTION_END___ performance
53
-
});
54
-
55
-
builder.Build().Run();
56
-
```
57
-
58
-
<Alert>
45
+
<OnboardingOptionoptionId="performance">
46
+
Performance tracing can be enabled by adding Sentry to the OpenTelemetry `TracerProviderBuilder` and then configuring Sentry itself to use OpenTelemetry.
47
+
</OnboardingOption>
59
48
60
-
If using the ASP.NET Core integration add `UseSentry` to the `ConfigureFunctionsWebApplication` call instead.
0 commit comments