From 609954dec6071b977e03a924f53a8c818d600629 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:43:41 -0400 Subject: [PATCH 1/8] ref: azure functions pkg change --- CHANGELOG.md | 6 ++++- README.md | 2 +- Sentry-CI-Build-Linux.slnf | 6 ++--- Sentry-CI-Build-Windows.slnf | 6 ++--- Sentry-CI-Build-macOS.slnf | 6 ++--- Sentry-CI-CodeQL.slnf | 2 +- Sentry.sln | 6 ++--- SentryAzureFunctions.slnf | 6 ++--- SentryNoMobile.slnf | 6 ++--- SentryNoSamples.slnf | 4 ++-- .../BadApple.cs | 2 +- .../Program.cs | 2 +- .../SampleHttpTrigger.cs | 2 +- .../SampleTimerTrigger.cs | 2 +- ...entry.Samples.AzureFunctions.Worker.csproj | 4 ++-- scripts/generate-solution-filters-config.yaml | 4 ++-- .../.editorconfig | 0 .../HttpRequestDataExtensions.cs | 2 +- .../Sentry.Azure.Functions.Worker.csproj} | 2 +- .../SentryAzureFunctionsLoggerProvider.cs | 14 ++++++++++++ .../SentryAzureFunctionsOptions.cs | 4 ++-- .../SentryAzureFunctionsOptionsSetup.cs | 22 +++++++++++++++++++ ...tionsWorkerApplicationBuilderExtensions.cs | 14 ++++++------ .../SentryFunctionsWorkerMiddleware.cs | 2 +- .../SentryAzureFunctionsLoggerProvider.cs | 14 ------------ .../SentryAzureFunctionsOptionsSetup.cs | 22 ------------------- .../Sentry.Extensions.Logging.csproj | 4 ++-- src/Sentry/Sentry.csproj | 4 ++-- ...piApprovalTests.Run.DotNet6_0.verified.txt | 8 +++---- ...piApprovalTests.Run.DotNet7_0.verified.txt | 8 +++---- .../ApiApprovalTests.Run.Net4_8.verified.txt | 8 +++---- .../ApiApprovalTests.verify.cs | 2 +- ...entry.Azure.Functions.Worker.Tests.csproj} | 2 +- .../SentryFunctionsWorkerMiddlewareTests.cs | 2 +- test/Sentry.Testing/Sentry.Testing.csproj | 2 +- test/Sentry.Tests/ScopeTests.cs | 6 ++--- 36 files changed, 106 insertions(+), 102 deletions(-) rename src/{Sentry.AzureFunctions.Worker => Sentry.Azure.Functions.Worker}/.editorconfig (100%) rename src/{Sentry.AzureFunctions.Worker => Sentry.Azure.Functions.Worker}/HttpRequestDataExtensions.cs (97%) rename src/{Sentry.AzureFunctions.Worker/Sentry.AzureFunctions.Worker.csproj => Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj} (88%) create mode 100644 src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs rename src/{Sentry.AzureFunctions.Worker => Sentry.Azure.Functions.Worker}/SentryAzureFunctionsOptions.cs (52%) create mode 100644 src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs rename src/{Sentry.AzureFunctions.Worker => Sentry.Azure.Functions.Worker}/SentryFunctionsWorkerApplicationBuilderExtensions.cs (75%) rename src/{Sentry.AzureFunctions.Worker => Sentry.Azure.Functions.Worker}/SentryFunctionsWorkerMiddleware.cs (99%) delete mode 100644 src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsLoggerProvider.cs delete mode 100644 src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptionsSetup.cs rename test/{Sentry.AzureFunctions.Worker.Tests => Sentry.Azure.Functions.Worker.Tests}/ApiApprovalTests.Run.DotNet6_0.verified.txt (75%) rename test/{Sentry.AzureFunctions.Worker.Tests => Sentry.Azure.Functions.Worker.Tests}/ApiApprovalTests.Run.DotNet7_0.verified.txt (75%) rename test/{Sentry.AzureFunctions.Worker.Tests => Sentry.Azure.Functions.Worker.Tests}/ApiApprovalTests.Run.Net4_8.verified.txt (75%) rename test/{Sentry.AzureFunctions.Worker.Tests => Sentry.Azure.Functions.Worker.Tests}/ApiApprovalTests.verify.cs (78%) rename test/{Sentry.AzureFunctions.Worker.Tests/Sentry.AzureFunctions.Worker.Tests.csproj => Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj} (69%) rename test/{Sentry.AzureFunctions.Worker.Tests => Sentry.Azure.Functions.Worker.Tests}/SentryFunctionsWorkerMiddlewareTests.cs (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872b948528..6791f85563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Resolved issue identifying users with OpenTelemetry ([#2618](https://github.com/getsentry/sentry-dotnet/pull/2618)) +### Azure Functions Beta + +- Package name changed from `Sentry.AzureFunctions.Worker` to `Sentry.Azure.Functions.Worker`. Note AzureFunctions now is split by a `.`. + ### Dependencies - Bump CLI from v2.20.6 to v2.20.7 ([#2604](https://github.com/getsentry/sentry-dotnet/pull/2604)) @@ -196,7 +200,7 @@ - Azure Functions (Isolated Worker/Out-of-Process) support ([#2346](https://github.com/getsentry/sentry-dotnet/pull/2346)) - Initial `beta.1` release. Please give it a try and let us know how it goes! - - Documentation is TBD. For now, see `/samples/Sentry.Samples.AzureFunctions.Worker`. + - Documentation is TBD. For now, see `/samples/Sentry.Samples.Azure.Functions.Worker`. - Add `Hint` support ([#2351](https://github.com/getsentry/sentry-dotnet/pull/2351)) - Currently, this allows you to manipulate attachments in the various "before" event delegates. diff --git a/README.md b/README.md index 20c23b10de..313b68ad63 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Sentry SDK for .NET | **Sentry.AspNet** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.AspNet.svg)](https://www.nuget.org/packages/Sentry.AspNet) | [![NuGet](https://img.shields.io/nuget/v/Sentry.AspNet.svg)](https://www.nuget.org/packages/Sentry.AspNet) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.AspNet.svg)](https://www.nuget.org/packages/Sentry.AspNet) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/aspnet) | | **Sentry.AspNetCore** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.AspNetCore.svg)](https://www.nuget.org/packages/Sentry.AspNetCore) | [![NuGet](https://img.shields.io/nuget/v/Sentry.AspNetCore.svg)](https://www.nuget.org/packages/Sentry.AspNetCore) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.AspNetCore.svg)](https://www.nuget.org/packages/Sentry.AspNetCore) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/) | | **Sentry.AspNetCore.Grpc** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.AspNetCore.Grpc.svg)](https://www.nuget.org/packages/Sentry.AspNetCore.Grpc) | [![NuGet](https://img.shields.io/nuget/v/Sentry.AspNetCore.Grpc.svg)](https://www.nuget.org/packages/Sentry.AspNetCore.Grpc) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.AspNetCore.Grpc.svg)](https://www.nuget.org/packages/Sentry.AspNetCore.Grpc) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/) | -| **Sentry.AzureFunctions.Worker** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.AzureFunctions.Worker.svg)](https://www.nuget.org/packages/Sentry.AzureFunctions.Worker) | [![NuGet](https://img.shields.io/nuget/v/Sentry.AzureFunctions.Worker.svg)](https://www.nuget.org/packages/Sentry.AzureFunctions.Worker) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.AzureFunctions.Worker.svg)](https://www.nuget.org/packages/Sentry.AzureFunctions.Worker) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/azure-functions-worker/) | +| **Sentry.Azure.Functions.Worker** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Azure.Functions.Worker.svg)](https://www.nuget.org/packages/Sentry.Azure.Functions.Worker) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Azure.Functions.Worker.svg)](https://www.nuget.org/packages/Sentry.Azure.Functions.Worker) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Azure.Functions.Worker.svg)](https://www.nuget.org/packages/Sentry.Azure.Functions.Worker) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/azure-functions-worker/) | | **Sentry.DiagnosticSource** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.DiagnosticSource.svg)](https://www.nuget.org/packages/Sentry.DiagnosticSource) | [![NuGet](https://img.shields.io/nuget/v/Sentry.DiagnosticSource.svg)](https://www.nuget.org/packages/Sentry.DiagnosticSource) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.DiagnosticSource.svg)](https://www.nuget.org/packages/Sentry.DiagnosticSource) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/performance/instrumentation/automatic-instrumentation/#diagnosticsource-integration) | | **Sentry.EntityFramework** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.EntityFramework.svg)](https://www.nuget.org/packages/Sentry.EntityFramework) | [![NuGet](https://img.shields.io/nuget/v/Sentry.EntityFramework.svg)](https://www.nuget.org/packages/Sentry.EntityFramework) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.EntityFramework.svg)](https://www.nuget.org/packages/Sentry.EntityFramework) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/entityframework) | | **Sentry.Extensions.Logging** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Extensions.Logging.svg)](https://www.nuget.org/packages/Sentry.Extensions.Logging) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Extensions.Logging.svg)](https://www.nuget.org/packages/Sentry.Extensions.Logging) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Extensions.Logging.svg)](https://www.nuget.org/packages/Sentry.Extensions.Logging) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/extensions-logging/) | diff --git a/Sentry-CI-Build-Linux.slnf b/Sentry-CI-Build-Linux.slnf index 66e27227ac..9a957b8738 100644 --- a/Sentry-CI-Build-Linux.slnf +++ b/Sentry-CI-Build-Linux.slnf @@ -11,7 +11,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", @@ -30,7 +30,7 @@ "src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.Bindings.Android\\Sentry.Bindings.Android.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", "src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj", @@ -47,7 +47,7 @@ "test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj", "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj", "test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj", "test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj", diff --git a/Sentry-CI-Build-Windows.slnf b/Sentry-CI-Build-Windows.slnf index b7eb1a731f..9be3ba0cb3 100644 --- a/Sentry-CI-Build-Windows.slnf +++ b/Sentry-CI-Build-Windows.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", @@ -30,7 +30,7 @@ "src\\Sentry.AspNet\\Sentry.AspNet.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.Bindings.Android\\Sentry.Bindings.Android.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", "src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj", @@ -48,7 +48,7 @@ "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj", "test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj", "test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj", diff --git a/Sentry-CI-Build-macOS.slnf b/Sentry-CI-Build-macOS.slnf index ac9978d4f2..59204ac740 100644 --- a/Sentry-CI-Build-macOS.slnf +++ b/Sentry-CI-Build-macOS.slnf @@ -12,7 +12,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", @@ -34,7 +34,7 @@ "src\\Sentry.AspNet\\Sentry.AspNet.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.Bindings.Android\\Sentry.Bindings.Android.csproj", "src\\Sentry.Bindings.Cocoa\\Sentry.Bindings.Cocoa.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", @@ -53,7 +53,7 @@ "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj", "test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj", "test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj", diff --git a/Sentry-CI-CodeQL.slnf b/Sentry-CI-CodeQL.slnf index 3d19fe5795..a8e9d91d8a 100644 --- a/Sentry-CI-CodeQL.slnf +++ b/Sentry-CI-CodeQL.slnf @@ -6,7 +6,7 @@ "src\\Sentry.AspNet\\Sentry.AspNet.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", "src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj", "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj", diff --git a/Sentry.sln b/Sentry.sln index 3a3345c754..a2d5108fab 100644 --- a/Sentry.sln +++ b/Sentry.sln @@ -25,7 +25,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.AspNetCore.S EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Aws.Lambda.AspNetCoreServer", "samples\Sentry.Samples.Aws.Lambda.AspNetCoreServer\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", "{50116F9A-646D-4BF7-9760-66E37CB9C459}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.AzureFunctions.Worker", "samples\Sentry.Samples.AzureFunctions.Worker\Sentry.Samples.AzureFunctions.Worker.csproj", "{1F44075F-ABD6-49A4-8EA1-DBB70304AD24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Azure.Functions.Worker", "samples\Sentry.Samples.Azure.Functions.Worker\Sentry.Samples.Azure.Functions.Worker.csproj", "{1F44075F-ABD6-49A4-8EA1-DBB70304AD24}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.Basic", "samples\Sentry.Samples.Console.Basic\Sentry.Samples.Console.Basic.csproj", "{B793249D-3E52-4B0D-964F-BC022CD8A753}" EndProject @@ -71,7 +71,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore.Grpc", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore", "src\Sentry.AspNetCore\Sentry.AspNetCore.csproj", "{4B323BCC-0E8D-43CE-9AC2-4B708278C7C2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AzureFunctions.Worker", "src\Sentry.AzureFunctions.Worker\Sentry.AzureFunctions.Worker.csproj", "{52262FBB-40D0-4F08-B00F-B298185FF6BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Azure.Functions.Worker", "src\Sentry.Azure.Functions.Worker\Sentry.Azure.Functions.Worker.csproj", "{52262FBB-40D0-4F08-B00F-B298185FF6BD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Bindings.Android", "src\Sentry.Bindings.Android\Sentry.Bindings.Android.csproj", "{759D9E53-4717-491D-9970-B3A3367C65E7}" EndProject @@ -121,7 +121,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore.TestUtils EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore.Tests", "test\Sentry.AspNetCore.Tests\Sentry.AspNetCore.Tests.csproj", "{6D9EB590-CED1-47C2-87B1-E65EE0EEBB9E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AzureFunctions.Worker.Tests", "test\Sentry.AzureFunctions.Worker.Tests\Sentry.AzureFunctions.Worker.Tests.csproj", "{39F7BB08-908B-49F9-A96B-E14C16B69090}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Azure.Functions.Worker.Tests", "test\Sentry.Azure.Functions.Worker.Tests\Sentry.Azure.Functions.Worker.Tests.csproj", "{39F7BB08-908B-49F9-A96B-E14C16B69090}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.DiagnosticSource.IntegrationTests", "test\Sentry.DiagnosticSource.IntegrationTests\Sentry.DiagnosticSource.IntegrationTests.csproj", "{59742E7E-4380-4B40-BCC8-5AB314290198}" EndProject diff --git a/SentryAzureFunctions.slnf b/SentryAzureFunctions.slnf index 9a3de496ee..eda8164723 100644 --- a/SentryAzureFunctions.slnf +++ b/SentryAzureFunctions.slnf @@ -2,12 +2,12 @@ "solution": { "path": "Sentry.sln", "projects": [ - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj", "src\\Sentry\\Sentry.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj", "test\\Sentry.Testing\\Sentry.Testing.csproj", "test\\Sentry.Tests\\Sentry.Tests.csproj" diff --git a/SentryNoMobile.slnf b/SentryNoMobile.slnf index e243c2ab41..e57c1df8f0 100644 --- a/SentryNoMobile.slnf +++ b/SentryNoMobile.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", @@ -28,7 +28,7 @@ "samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", "src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj", "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj", @@ -43,7 +43,7 @@ "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj", "test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj", "test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj", diff --git a/SentryNoSamples.slnf b/SentryNoSamples.slnf index 76851d4bfb..d950cd0434 100644 --- a/SentryNoSamples.slnf +++ b/SentryNoSamples.slnf @@ -6,7 +6,7 @@ "src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj", "src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj", "src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj", - "src\\Sentry.AzureFunctions.Worker\\Sentry.AzureFunctions.Worker.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj", "src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj", "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj", @@ -23,7 +23,7 @@ "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", - "test\\Sentry.AzureFunctions.Worker.Tests\\Sentry.AzureFunctions.Worker.Tests.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", "test\\Sentry.DiagnosticSource.IntegrationTests\\Sentry.DiagnosticSource.IntegrationTests.csproj", "test\\Sentry.DiagnosticSource.Tests\\Sentry.DiagnosticSource.Tests.csproj", "test\\Sentry.EntityFramework.Tests\\Sentry.EntityFramework.Tests.csproj", diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs b/samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs index 3d8533e0e8..7f815aea97 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs +++ b/samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs @@ -1,4 +1,4 @@ -namespace Sentry.Samples.AzureFunctions.Worker; +namespace Sentry.Samples.Azure.Functions.Worker; internal static class BadApple { diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs b/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs index 408cd343d2..519429bf52 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs +++ b/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.Hosting; -using Sentry.AzureFunctions.Worker; +using Sentry.Azure.Functions.Worker; var host = new HostBuilder() .ConfigureFunctionsWorkerDefaults((host, builder) => diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs b/samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs index 1fda457f48..607cb056f8 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs +++ b/samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs @@ -3,7 +3,7 @@ using Microsoft.Azure.Functions.Worker.Http; using Microsoft.Extensions.Logging; -namespace Sentry.Samples.AzureFunctions.Worker; +namespace Sentry.Samples.Azure.Functions.Worker; public class SampleHttpTrigger { diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs b/samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs index 97494e2fdb..7c8cb9e239 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs +++ b/samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs @@ -1,7 +1,7 @@ using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; -namespace Sentry.Samples.AzureFunctions.Worker; +namespace Sentry.Samples.Azure.Functions.Worker; public class SampleTimerTrigger { diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj b/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj index efb8d7c71e..16ecb11fbc 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj +++ b/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj @@ -1,7 +1,7 @@ net6.0 - v4 + v4 Exe @@ -23,6 +23,6 @@ - + \ No newline at end of file diff --git a/scripts/generate-solution-filters-config.yaml b/scripts/generate-solution-filters-config.yaml index 9ef792e9fb..df3ccd29e4 100644 --- a/scripts/generate-solution-filters-config.yaml +++ b/scripts/generate-solution-filters-config.yaml @@ -93,10 +93,10 @@ filterConfigs: - "**/Sentry.Testing.csproj" - "**/Sentry.Tests.csproj" - - outputPath: SentryAzureFunctions.slnf + - outputPath: SentryAzure.Functions.slnf include: patterns: - - "**/*AzureFunctions*.csproj" + - "**/*Azure.Functions*.csproj" - "**/Sentry.Samples.Console.Basic.csproj" - "**/Sentry.Extensions.Logging.csproj" - "**/Sentry.csproj" diff --git a/src/Sentry.AzureFunctions.Worker/.editorconfig b/src/Sentry.Azure.Functions.Worker/.editorconfig similarity index 100% rename from src/Sentry.AzureFunctions.Worker/.editorconfig rename to src/Sentry.Azure.Functions.Worker/.editorconfig diff --git a/src/Sentry.AzureFunctions.Worker/HttpRequestDataExtensions.cs b/src/Sentry.Azure.Functions.Worker/HttpRequestDataExtensions.cs similarity index 97% rename from src/Sentry.AzureFunctions.Worker/HttpRequestDataExtensions.cs rename to src/Sentry.Azure.Functions.Worker/HttpRequestDataExtensions.cs index bacbbd41f2..168dad89cf 100644 --- a/src/Sentry.AzureFunctions.Worker/HttpRequestDataExtensions.cs +++ b/src/Sentry.Azure.Functions.Worker/HttpRequestDataExtensions.cs @@ -1,7 +1,7 @@ using Microsoft.Azure.Functions.Worker.Http; using Sentry.Extensibility; -namespace Sentry.AzureFunctions.Worker; +namespace Sentry.Azure.Functions.Worker; internal static class HttpRequestDataExtensions { diff --git a/src/Sentry.AzureFunctions.Worker/Sentry.AzureFunctions.Worker.csproj b/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj similarity index 88% rename from src/Sentry.AzureFunctions.Worker/Sentry.AzureFunctions.Worker.csproj rename to src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj index d82057796b..ae05495949 100644 --- a/src/Sentry.AzureFunctions.Worker/Sentry.AzureFunctions.Worker.csproj +++ b/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs new file mode 100644 index 0000000000..85a8102530 --- /dev/null +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs @@ -0,0 +1,14 @@ +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Sentry.Extensions.Logging; + +namespace Sentry.Azure.Functions.Worker; + +[ProviderAlias("Sentry")] +internal class SentryAzure.FunctionsLoggerProvider : SentryLoggerProvider +{ + public SentryAzure.FunctionsLoggerProvider(IOptions options, IHub hub) + : base(options, hub) + { + } +} diff --git a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptions.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs similarity index 52% rename from src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptions.cs rename to src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs index 9f140446a9..68af5a362e 100644 --- a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptions.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs @@ -1,10 +1,10 @@ using Sentry.Extensions.Logging; -namespace Sentry.AzureFunctions.Worker; +namespace Sentry.Azure.Functions.Worker; /// /// Sentry Azure Functions integration options /// -public class SentryAzureFunctionsOptions : SentryLoggingOptions +public class SentryAzure.FunctionsOptions : SentryLoggingOptions { } diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs new file mode 100644 index 0000000000..272e57ce95 --- /dev/null +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Options; + +namespace Sentry.Azure.Functions.Worker; + +internal class SentryAzure.FunctionsOptionsSetup : ConfigureFromConfigurationOptions +{ + public SentryAzure.FunctionsOptionsSetup(IConfiguration config) : base(config) + { + } + + public override void Configure(SentryAzure.FunctionsOptions options) + { + // Mutable by user options + + base.Configure(options); + + // Immutable by user options + + options.TagFilters.Add("Azure.Functions_"); + } +} diff --git a/src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs similarity index 75% rename from src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs rename to src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs index c6ced4562e..8c93ee0857 100644 --- a/src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Options; using Sentry.Extensions.Logging.Extensions.DependencyInjection; -namespace Sentry.AzureFunctions.Worker; +namespace Sentry.Azure.Functions.Worker; /// /// Sentry extension methods for Azure Functions with Isolated Worker SDK @@ -18,7 +18,7 @@ public static class SentryFunctionsWorkerApplicationBuilderExtensions /// Uses Sentry integration. /// public static IFunctionsWorkerApplicationBuilder UseSentry(this IFunctionsWorkerApplicationBuilder builder, HostBuilderContext context) - => UseSentry(builder, context, (Action?)null); + => UseSentry(builder, context, (Action?)null); /// /// Uses Sentry integration. @@ -32,12 +32,12 @@ public static IFunctionsWorkerApplicationBuilder UseSentry(this IFunctionsWorker public static IFunctionsWorkerApplicationBuilder UseSentry( this IFunctionsWorkerApplicationBuilder builder, HostBuilderContext context, - Action? optionsConfiguration) + Action? optionsConfiguration) { builder.UseMiddleware(); var services = builder.Services; - services.Configure(options => + services.Configure(options => context.Configuration.GetSection("Sentry").Bind(options)); if (optionsConfiguration != null) @@ -46,10 +46,10 @@ public static IFunctionsWorkerApplicationBuilder UseSentry( } services.AddLogging(); - services.AddSingleton(); - services.AddSingleton, SentryAzureFunctionsOptionsSetup>(); + services.AddSingleton(); + services.AddSingleton, SentryAzure.FunctionsOptionsSetup>(); - services.AddSentry(); + services.AddSentry(); return builder; } diff --git a/src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerMiddleware.cs b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs similarity index 99% rename from src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerMiddleware.cs rename to src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs index 45fdc8fef5..de36f83502 100644 --- a/src/Sentry.AzureFunctions.Worker/SentryFunctionsWorkerMiddleware.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerMiddleware.cs @@ -3,7 +3,7 @@ using Microsoft.Azure.Functions.Worker.Middleware; using Sentry.Extensibility; -namespace Sentry.AzureFunctions.Worker; +namespace Sentry.Azure.Functions.Worker; internal class SentryFunctionsWorkerMiddleware : IFunctionsWorkerMiddleware { diff --git a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsLoggerProvider.cs b/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsLoggerProvider.cs deleted file mode 100644 index 595d49ce9f..0000000000 --- a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsLoggerProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Sentry.Extensions.Logging; - -namespace Sentry.AzureFunctions.Worker; - -[ProviderAlias("Sentry")] -internal class SentryAzureFunctionsLoggerProvider : SentryLoggerProvider -{ - public SentryAzureFunctionsLoggerProvider(IOptions options, IHub hub) - : base(options, hub) - { - } -} diff --git a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptionsSetup.cs b/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptionsSetup.cs deleted file mode 100644 index 4872860c5c..0000000000 --- a/src/Sentry.AzureFunctions.Worker/SentryAzureFunctionsOptionsSetup.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Options; - -namespace Sentry.AzureFunctions.Worker; - -internal class SentryAzureFunctionsOptionsSetup : ConfigureFromConfigurationOptions -{ - public SentryAzureFunctionsOptionsSetup(IConfiguration config) : base(config) - { - } - - public override void Configure(SentryAzureFunctionsOptions options) - { - // Mutable by user options - - base.Configure(options); - - // Immutable by user options - - options.TagFilters.Add("AzureFunctions_"); - } -} diff --git a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj index e012e562dc..ed10785340 100644 --- a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj +++ b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj @@ -35,8 +35,8 @@ - - + + diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index 68054813d8..a80f09d302 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -130,8 +130,8 @@ - - + + diff --git a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt similarity index 75% rename from test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt rename to test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 313d900c70..8b0d8bbcb7 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -1,13 +1,13 @@ -namespace Sentry.AzureFunctions.Worker +namespace Sentry.Azure.Functions.Worker { - public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzureFunctionsOptions() { } + public SentryAzure.FunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt similarity index 75% rename from test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt rename to test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 313d900c70..8b0d8bbcb7 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -1,13 +1,13 @@ -namespace Sentry.AzureFunctions.Worker +namespace Sentry.Azure.Functions.Worker { - public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzureFunctionsOptions() { } + public SentryAzure.FunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt similarity index 75% rename from test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt rename to test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 313d900c70..8b0d8bbcb7 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -1,13 +1,13 @@ -namespace Sentry.AzureFunctions.Worker +namespace Sentry.Azure.Functions.Worker { - public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzureFunctionsOptions() { } + public SentryAzure.FunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.verify.cs b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.verify.cs similarity index 78% rename from test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.verify.cs rename to test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.verify.cs index c119cb76f6..bee62da0b5 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/ApiApprovalTests.verify.cs +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.verify.cs @@ -1,4 +1,4 @@ -namespace Sentry.AzureFunctions.Worker.Tests; +namespace Sentry.Azure.Functions.Worker.Tests; [UsesVerify] public class ApiApprovalTests diff --git a/test/Sentry.AzureFunctions.Worker.Tests/Sentry.AzureFunctions.Worker.Tests.csproj b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj similarity index 69% rename from test/Sentry.AzureFunctions.Worker.Tests/Sentry.AzureFunctions.Worker.Tests.csproj rename to test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj index 5cbd742e57..6e6e9b0c5d 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/Sentry.AzureFunctions.Worker.Tests.csproj +++ b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj @@ -5,7 +5,7 @@ - + diff --git a/test/Sentry.AzureFunctions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs b/test/Sentry.Azure.Functions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs similarity index 99% rename from test/Sentry.AzureFunctions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs rename to test/Sentry.Azure.Functions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs index b6ed452831..bc37229524 100644 --- a/test/Sentry.AzureFunctions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs +++ b/test/Sentry.Azure.Functions.Worker.Tests/SentryFunctionsWorkerMiddlewareTests.cs @@ -1,7 +1,7 @@ using Microsoft.Azure.Functions.Worker; using Microsoft.Azure.Functions.Worker.Http; -namespace Sentry.AzureFunctions.Worker.Tests; +namespace Sentry.Azure.Functions.Worker.Tests; public class SentryFunctionsWorkerMiddlewareTests { diff --git a/test/Sentry.Testing/Sentry.Testing.csproj b/test/Sentry.Testing/Sentry.Testing.csproj index 566c822de3..65a23e1159 100644 --- a/test/Sentry.Testing/Sentry.Testing.csproj +++ b/test/Sentry.Testing/Sentry.Testing.csproj @@ -14,7 +14,7 @@ - + diff --git a/test/Sentry.Tests/ScopeTests.cs b/test/Sentry.Tests/ScopeTests.cs index dbd8e9308d..233f67797f 100644 --- a/test/Sentry.Tests/ScopeTests.cs +++ b/test/Sentry.Tests/ScopeTests.cs @@ -599,13 +599,13 @@ public void Filtered_tags_are_not_set() var tags = new List> { new("AzFunctions", "rule"), - new("AzureFunctions_FunctionName", "Func"), - new("AzureFunctions_InvocationId", "20a09c3b-e9dd-43fe-9a73-ebae1f90cab6"), + new("Azure.Functions_FunctionName", "Func"), + new("Azure.Functions_InvocationId", "20a09c3b-e9dd-43fe-9a73-ebae1f90cab6"), }; var scope = new Scope(new SentryOptions { - TagFilters = new[] { new SubstringOrRegexPattern("AzureFunctions_") } + TagFilters = new[] { new SubstringOrRegexPattern("Azure.Functions_") } }); foreach (var (key, value) in tags) From bbf08dcd2ba8991394aeb37f918fec4104ab0c22 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:46:14 -0400 Subject: [PATCH 2/8] undo some --- .../SentryAzureFunctionsLoggerProvider.cs | 2 +- .../SentryAzureFunctionsOptions.cs | 2 +- .../SentryAzureFunctionsOptionsSetup.cs | 8 ++++---- ...entryFunctionsWorkerApplicationBuilderExtensions.cs | 10 +++++----- .../ApiApprovalTests.Run.DotNet6_0.verified.txt | 6 +++--- .../ApiApprovalTests.Run.DotNet7_0.verified.txt | 6 +++--- .../ApiApprovalTests.Run.Net4_8.verified.txt | 6 +++--- test/Sentry.Tests/ScopeTests.cs | 6 +++--- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs index 85a8102530..1d21086c22 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs @@ -7,7 +7,7 @@ namespace Sentry.Azure.Functions.Worker; [ProviderAlias("Sentry")] internal class SentryAzure.FunctionsLoggerProvider : SentryLoggerProvider { - public SentryAzure.FunctionsLoggerProvider(IOptions options, IHub hub) + public SentryAzure.FunctionsLoggerProvider(IOptions options, IHub hub) : base(options, hub) { } diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs index 68af5a362e..7bf9c4a8ab 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptions.cs @@ -5,6 +5,6 @@ namespace Sentry.Azure.Functions.Worker; /// /// Sentry Azure Functions integration options /// -public class SentryAzure.FunctionsOptions : SentryLoggingOptions +public class SentryAzureFunctionsOptions : SentryLoggingOptions { } diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs index 272e57ce95..a020a5851b 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs @@ -3,13 +3,13 @@ namespace Sentry.Azure.Functions.Worker; -internal class SentryAzure.FunctionsOptionsSetup : ConfigureFromConfigurationOptions +internal class SentryAzureFunctionsOptionsSetup : ConfigureFromConfigurationOptions { - public SentryAzure.FunctionsOptionsSetup(IConfiguration config) : base(config) + public SentryAzureFunctionsOptionsSetup(IConfiguration config) : base(config) { } - public override void Configure(SentryAzure.FunctionsOptions options) + public override void Configure(SentryAzureFunctionsOptions options) { // Mutable by user options @@ -17,6 +17,6 @@ public override void Configure(SentryAzure.FunctionsOptions options) // Immutable by user options - options.TagFilters.Add("Azure.Functions_"); + options.TagFilters.Add("AzureFunctions_"); } } diff --git a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs index 8c93ee0857..fa4d237c53 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs @@ -18,7 +18,7 @@ public static class SentryFunctionsWorkerApplicationBuilderExtensions /// Uses Sentry integration. /// public static IFunctionsWorkerApplicationBuilder UseSentry(this IFunctionsWorkerApplicationBuilder builder, HostBuilderContext context) - => UseSentry(builder, context, (Action?)null); + => UseSentry(builder, context, (Action?)null); /// /// Uses Sentry integration. @@ -32,12 +32,12 @@ public static IFunctionsWorkerApplicationBuilder UseSentry(this IFunctionsWorker public static IFunctionsWorkerApplicationBuilder UseSentry( this IFunctionsWorkerApplicationBuilder builder, HostBuilderContext context, - Action? optionsConfiguration) + Action? optionsConfiguration) { builder.UseMiddleware(); var services = builder.Services; - services.Configure(options => + services.Configure(options => context.Configuration.GetSection("Sentry").Bind(options)); if (optionsConfiguration != null) @@ -47,9 +47,9 @@ public static IFunctionsWorkerApplicationBuilder UseSentry( services.AddLogging(); services.AddSingleton(); - services.AddSingleton, SentryAzure.FunctionsOptionsSetup>(); + services.AddSingleton, SentryAzureFunctionsOptionsSetup>(); - services.AddSentry(); + services.AddSentry(); return builder; } diff --git a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 8b0d8bbcb7..f6955863c0 100644 --- a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -1,13 +1,13 @@ namespace Sentry.Azure.Functions.Worker { - public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzure.FunctionsOptions() { } + public SentryAzureFunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 8b0d8bbcb7..f6955863c0 100644 --- a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -1,13 +1,13 @@ namespace Sentry.Azure.Functions.Worker { - public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzure.FunctionsOptions() { } + public SentryAzureFunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 8b0d8bbcb7..f6955863c0 100644 --- a/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Azure.Functions.Worker.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -1,13 +1,13 @@ namespace Sentry.Azure.Functions.Worker { - public class SentryAzure.FunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions + public class SentryAzureFunctionsOptions : Sentry.Extensions.Logging.SentryLoggingOptions { - public SentryAzure.FunctionsOptions() { } + public SentryAzureFunctionsOptions() { } } public static class SentryFunctionsWorkerApplicationBuilderExtensions { public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context) { } - public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } + public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, System.Action? optionsConfiguration) { } public static Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder UseSentry(this Microsoft.Azure.Functions.Worker.IFunctionsWorkerApplicationBuilder builder, Microsoft.Extensions.Hosting.HostBuilderContext context, string dsn) { } } } \ No newline at end of file diff --git a/test/Sentry.Tests/ScopeTests.cs b/test/Sentry.Tests/ScopeTests.cs index 233f67797f..dbd8e9308d 100644 --- a/test/Sentry.Tests/ScopeTests.cs +++ b/test/Sentry.Tests/ScopeTests.cs @@ -599,13 +599,13 @@ public void Filtered_tags_are_not_set() var tags = new List> { new("AzFunctions", "rule"), - new("Azure.Functions_FunctionName", "Func"), - new("Azure.Functions_InvocationId", "20a09c3b-e9dd-43fe-9a73-ebae1f90cab6"), + new("AzureFunctions_FunctionName", "Func"), + new("AzureFunctions_InvocationId", "20a09c3b-e9dd-43fe-9a73-ebae1f90cab6"), }; var scope = new Scope(new SentryOptions { - TagFilters = new[] { new SubstringOrRegexPattern("Azure.Functions_") } + TagFilters = new[] { new SubstringOrRegexPattern("AzureFunctions_") } }); foreach (var (key, value) in tags) From 0eb07bd784c3ad95b68797e59efcfe0fbee7d486 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:48:26 -0400 Subject: [PATCH 3/8] wip --- .../SentryFunctionsWorkerApplicationBuilderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs index fa4d237c53..b374cf6d22 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryFunctionsWorkerApplicationBuilderExtensions.cs @@ -46,7 +46,7 @@ public static IFunctionsWorkerApplicationBuilder UseSentry( } services.AddLogging(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton, SentryAzureFunctionsOptionsSetup>(); services.AddSentry(); From a255e5b7c91a936ac78eeaeee2bc5f7669939607 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:49:15 -0400 Subject: [PATCH 4/8] wip --- .craft.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.craft.yml b/.craft.yml index 4542ab0f76..e8a71e3cdd 100644 --- a/.craft.yml +++ b/.craft.yml @@ -17,3 +17,4 @@ targets: nuget:Sentry.NLog: nuget:Sentry.Google.Cloud.Functions: nuget:Sentry.Maui: + nuget:Sentry.Azure.Functions.Worker: From 0439001ab6b47457e1e7262982308b5926863b0c Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:56:24 -0400 Subject: [PATCH 5/8] pr num --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6791f85563..aded83e331 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### Azure Functions Beta -- Package name changed from `Sentry.AzureFunctions.Worker` to `Sentry.Azure.Functions.Worker`. Note AzureFunctions now is split by a `.`. +- Package name changed from `Sentry.AzureFunctions.Worker` to `Sentry.Azure.Functions.Worker`. Note AzureFunctions now is split by a `.`. ([#2637](https://github.com/getsentry/sentry-dotnet/pull/2637)) ### Dependencies From 98d80e2fc5b7b805a3f721109e9f8551de6ecce9 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 11:58:25 -0400 Subject: [PATCH 6/8] generate-solution-filters.ps1 --- Sentry-CI-Build-Linux.slnf | 2 +- Sentry-CI-Build-Windows.slnf | 2 +- Sentry-CI-Build-macOS.slnf | 2 +- SentryAzure.Functions.slnf | 15 +++++++++++++++ SentryNoMobile.slnf | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 SentryAzure.Functions.slnf diff --git a/Sentry-CI-Build-Linux.slnf b/Sentry-CI-Build-Linux.slnf index 9a957b8738..fd03345184 100644 --- a/Sentry-CI-Build-Linux.slnf +++ b/Sentry-CI-Build-Linux.slnf @@ -11,7 +11,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", + "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/Sentry-CI-Build-Windows.slnf b/Sentry-CI-Build-Windows.slnf index 9be3ba0cb3..c3eac43448 100644 --- a/Sentry-CI-Build-Windows.slnf +++ b/Sentry-CI-Build-Windows.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", + "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/Sentry-CI-Build-macOS.slnf b/Sentry-CI-Build-macOS.slnf index 59204ac740..ee35e832da 100644 --- a/Sentry-CI-Build-macOS.slnf +++ b/Sentry-CI-Build-macOS.slnf @@ -12,7 +12,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", + "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/SentryAzure.Functions.slnf b/SentryAzure.Functions.slnf new file mode 100644 index 0000000000..e63f79d075 --- /dev/null +++ b/SentryAzure.Functions.slnf @@ -0,0 +1,15 @@ +{ + "solution": { + "path": "Sentry.sln", + "projects": [ + "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", + "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", + "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj", + "src\\Sentry\\Sentry.csproj", + "test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj", + "test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj", + "test\\Sentry.Testing\\Sentry.Testing.csproj", + "test\\Sentry.Tests\\Sentry.Tests.csproj" + ] + } +} diff --git a/SentryNoMobile.slnf b/SentryNoMobile.slnf index e57c1df8f0..3ab789c0cc 100644 --- a/SentryNoMobile.slnf +++ b/SentryNoMobile.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", + "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", From 0c039b517a7396bf21616db4ba0b56d9327ae006 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 19:50:23 -0400 Subject: [PATCH 7/8] wip --- Sentry-CI-Build-Linux.slnf | 2 +- Sentry-CI-Build-Windows.slnf | 2 +- Sentry-CI-Build-macOS.slnf | 2 +- SentryNoMobile.slnf | 2 +- .../BadApple.cs | 0 .../Program.cs | 0 .../SampleHttpTrigger.cs | 0 .../SampleTimerTrigger.cs | 0 .../Sentry.Samples.Azure.Functions.Worker.csproj} | 12 ++++++------ .../host.json | 0 .../local.settings.json | 0 scripts/generate-solution-filters-config.yaml | 2 +- .../SentryAzureFunctionsLoggerProvider.cs | 4 ++-- 13 files changed, 13 insertions(+), 13 deletions(-) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/BadApple.cs (100%) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/Program.cs (100%) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/SampleHttpTrigger.cs (100%) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/SampleTimerTrigger.cs (100%) rename samples/{Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj => Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj} (93%) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/host.json (100%) rename samples/{Sentry.Samples.AzureFunctions.Worker => Sentry.Samples.Azure.Functions.Worker}/local.settings.json (100%) diff --git a/Sentry-CI-Build-Linux.slnf b/Sentry-CI-Build-Linux.slnf index fd03345184..9a957b8738 100644 --- a/Sentry-CI-Build-Linux.slnf +++ b/Sentry-CI-Build-Linux.slnf @@ -11,7 +11,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/Sentry-CI-Build-Windows.slnf b/Sentry-CI-Build-Windows.slnf index c3eac43448..9be3ba0cb3 100644 --- a/Sentry-CI-Build-Windows.slnf +++ b/Sentry-CI-Build-Windows.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/Sentry-CI-Build-macOS.slnf b/Sentry-CI-Build-macOS.slnf index ee35e832da..59204ac740 100644 --- a/Sentry-CI-Build-macOS.slnf +++ b/Sentry-CI-Build-macOS.slnf @@ -12,7 +12,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/SentryNoMobile.slnf b/SentryNoMobile.slnf index 3ab789c0cc..e57c1df8f0 100644 --- a/SentryNoMobile.slnf +++ b/SentryNoMobile.slnf @@ -10,7 +10,7 @@ "samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj", "samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj", "samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj", - "samples\\Sentry.Samples.AzureFunctions.Worker\\Sentry.Samples.AzureFunctions.Worker.csproj", + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj", "samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj", diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs b/samples/Sentry.Samples.Azure.Functions.Worker/BadApple.cs similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/BadApple.cs rename to samples/Sentry.Samples.Azure.Functions.Worker/BadApple.cs diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/Program.cs b/samples/Sentry.Samples.Azure.Functions.Worker/Program.cs similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/Program.cs rename to samples/Sentry.Samples.Azure.Functions.Worker/Program.cs diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs b/samples/Sentry.Samples.Azure.Functions.Worker/SampleHttpTrigger.cs similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/SampleHttpTrigger.cs rename to samples/Sentry.Samples.Azure.Functions.Worker/SampleHttpTrigger.cs diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs b/samples/Sentry.Samples.Azure.Functions.Worker/SampleTimerTrigger.cs similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/SampleTimerTrigger.cs rename to samples/Sentry.Samples.Azure.Functions.Worker/SampleTimerTrigger.cs diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj b/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj similarity index 93% rename from samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj rename to samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj index 16ecb11fbc..e4f3d2cc3c 100644 --- a/samples/Sentry.Samples.AzureFunctions.Worker/Sentry.Samples.AzureFunctions.Worker.csproj +++ b/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj @@ -1,28 +1,28 @@ net6.0 - v4 + v4 Exe - + - + - + - + - \ No newline at end of file + diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/host.json b/samples/Sentry.Samples.Azure.Functions.Worker/host.json similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/host.json rename to samples/Sentry.Samples.Azure.Functions.Worker/host.json diff --git a/samples/Sentry.Samples.AzureFunctions.Worker/local.settings.json b/samples/Sentry.Samples.Azure.Functions.Worker/local.settings.json similarity index 100% rename from samples/Sentry.Samples.AzureFunctions.Worker/local.settings.json rename to samples/Sentry.Samples.Azure.Functions.Worker/local.settings.json diff --git a/scripts/generate-solution-filters-config.yaml b/scripts/generate-solution-filters-config.yaml index df3ccd29e4..94d3fd42c7 100644 --- a/scripts/generate-solution-filters-config.yaml +++ b/scripts/generate-solution-filters-config.yaml @@ -93,7 +93,7 @@ filterConfigs: - "**/Sentry.Testing.csproj" - "**/Sentry.Tests.csproj" - - outputPath: SentryAzure.Functions.slnf + - outputPath: Sentry.Azure.Functions.slnf include: patterns: - "**/*Azure.Functions*.csproj" diff --git a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs index 1d21086c22..175fb966a3 100644 --- a/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs +++ b/src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsLoggerProvider.cs @@ -5,9 +5,9 @@ namespace Sentry.Azure.Functions.Worker; [ProviderAlias("Sentry")] -internal class SentryAzure.FunctionsLoggerProvider : SentryLoggerProvider +internal class SentryAzureFunctionsLoggerProvider : SentryLoggerProvider { - public SentryAzure.FunctionsLoggerProvider(IOptions options, IHub hub) + public SentryAzureFunctionsLoggerProvider(IOptions options, IHub hub) : base(options, hub) { } From c39c801d8e3b4fe3bd7cad3c9868c04db0b6f4f5 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Tue, 19 Sep 2023 20:17:13 -0400 Subject: [PATCH 8/8] fix slnf --- SentryAzure.Functions.slnf => Sentry.Azure.Functions.slnf | 1 + 1 file changed, 1 insertion(+) rename SentryAzure.Functions.slnf => Sentry.Azure.Functions.slnf (85%) diff --git a/SentryAzure.Functions.slnf b/Sentry.Azure.Functions.slnf similarity index 85% rename from SentryAzure.Functions.slnf rename to Sentry.Azure.Functions.slnf index e63f79d075..eda8164723 100644 --- a/SentryAzure.Functions.slnf +++ b/Sentry.Azure.Functions.slnf @@ -2,6 +2,7 @@ "solution": { "path": "Sentry.sln", "projects": [ + "samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj", "samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj", "src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj", "src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj",