Skip to content

Commit 97c6a11

Browse files
authored
Add azure function overloads (#12758)
* Update azure functions with new easier overload * Update index.mdx * Update index.mdx * Remove other namespaces
1 parent 1d3089b commit 97c6a11

File tree

1 file changed

+18
-1
lines changed
  • docs/platforms/dotnet/guides/azure-functions-worker

1 file changed

+18
-1
lines changed

docs/platforms/dotnet/guides/azure-functions-worker/index.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,31 @@ This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extens
3333

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

36+
```csharp {"onboardingOptions": {"performance": "11-13"}}
37+
using Sentry.Azure.Functions.Worker;
38+
39+
var builder = FunctionsApplication.CreateBuilder(args);
40+
41+
builder.UseSentry(options =>
42+
{
43+
options.Dsn = "___PUBLIC_DSN___";
44+
// When configuring for the first time, to see what the SDK is doing:
45+
options.Debug = true;
46+
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
47+
// We recommend adjusting this value in production.
48+
options.TracesSampleRate = 1.0;
49+
});
50+
51+
builder.Build().Run();
52+
```
3653

3754
<Alert>
3855

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

4158
</Alert>
4259

43-
```csharp {"onboardingOptions": {"performance": "11-13"}}
60+
```csharp
4461
using Sentry.Azure.Functions.Worker;
4562

4663
var host = new HostBuilder()

0 commit comments

Comments
 (0)