From 97c6a118a644566ad8a190098dbb021cf581c5c7 Mon Sep 17 00:00:00 2001 From: Allan Ritchie Date: Tue, 18 Feb 2025 12:06:33 -0500 Subject: [PATCH] Add azure function overloads (#12758) * Update azure functions with new easier overload * Update index.mdx * Update index.mdx * Remove other namespaces --- .../guides/azure-functions-worker/index.mdx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx b/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx index 8a0a44c1fa1ba..68063ab43a853 100644 --- a/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx +++ b/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx @@ -33,6 +33,23 @@ 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(); +``` @@ -40,7 +57,7 @@ If using the ASP.NET Core integration add `UseSentry` to the `ConfigureFunctions -```csharp {"onboardingOptions": {"performance": "11-13"}} +```csharp using Sentry.Azure.Functions.Worker; var host = new HostBuilder()