Skip to content

Commit

Permalink
Add azure function overloads (#12758)
Browse files Browse the repository at this point in the history
* Update azure functions with new easier overload

* Update index.mdx

* Update index.mdx

* Remove other namespaces
  • Loading branch information
aritchie authored Feb 18, 2025
1 parent 1d3089b commit 97c6a11
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/platforms/dotnet/guides/azure-functions-worker/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,31 @@ This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extens

Sentry integration with Azure Functions is done by calling `.UseSentry()` and specifying the options, for example:

```csharp {"onboardingOptions": {"performance": "11-13"}}
using Sentry.Azure.Functions.Worker;

var builder = FunctionsApplication.CreateBuilder(args);

builder.UseSentry(options =>
{
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
});

builder.Build().Run();
```

<Alert>

If using the ASP.NET Core integration add `UseSentry` to the `ConfigureFunctionsWebApplication` call instead.

</Alert>

```csharp {"onboardingOptions": {"performance": "11-13"}}
```csharp
using Sentry.Azure.Functions.Worker;

var host = new HostBuilder()
Expand Down

0 comments on commit 97c6a11

Please sign in to comment.