diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml index 7b856572c4..82012aa43e 100644 --- a/.github/actions/environment/action.yml +++ b/.github/actions/environment/action.yml @@ -56,22 +56,12 @@ runs: brew link --overwrite mono - name: Install .NET SDK - if: runner.os != 'Windows' uses: actions/setup-dotnet@v4 with: dotnet-version: | - 6.0.x - 7.0.x 8.0.x 9.0.100 - - name: Install .NET 9 - if: runner.os == 'Windows' - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 9.0.100 - - name: Install .NET Workloads shell: bash run: > diff --git a/CHANGELOG.md b/CHANGELOG.md index 79bb899256..f810839299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### API Changes +- Removed net6.0 and net7.0 TFMs as Microsoft has stopped supporting both of these now. If you need to target net6.0 or net7.0 then we recommend using version 4.x of the .NET SDK for Sentry. ([#3807](https://github.com/getsentry/sentry-dotnet/pull/3807)) - Temporarily removed experimental Session Replay support ([#3827](https://github.com/getsentry/sentry-dotnet/pull/3827)) ### Fixes diff --git a/src/Sentry.Android.AssemblyReader/Sentry.Android.AssemblyReader.csproj b/src/Sentry.Android.AssemblyReader/Sentry.Android.AssemblyReader.csproj index 277ce3d3a7..f64bf0f045 100644 --- a/src/Sentry.Android.AssemblyReader/Sentry.Android.AssemblyReader.csproj +++ b/src/Sentry.Android.AssemblyReader/Sentry.Android.AssemblyReader.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net6.0 + netstandard2.0;net8.0;net9.0 .NET assembly reader for Android diff --git a/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj b/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj index a47f53b5f6..4ff5701fa0 100644 --- a/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj +++ b/src/Sentry.AspNetCore.Blazor.WebAssembly/Sentry.AspNetCore.Blazor.WebAssembly.csproj @@ -1,7 +1,7 @@  - net6.0;net8.0 + net9.0;net8.0 Sentry.AspNetCore.Blazor.WebAssembly @@ -10,8 +10,8 @@ - - + + diff --git a/src/Sentry.AspNetCore.Grpc/Sentry.AspNetCore.Grpc.csproj b/src/Sentry.AspNetCore.Grpc/Sentry.AspNetCore.Grpc.csproj index 4fdafcee61..8963ddfd82 100644 --- a/src/Sentry.AspNetCore.Grpc/Sentry.AspNetCore.Grpc.csproj +++ b/src/Sentry.AspNetCore.Grpc/Sentry.AspNetCore.Grpc.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 $(PackageTags);AspNetCore;gRPC Official ASP.NET Core gRPC integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.AspNetCore/Sentry.AspNetCore.csproj b/src/Sentry.AspNetCore/Sentry.AspNetCore.csproj index 7c0d439b94..5220958947 100644 --- a/src/Sentry.AspNetCore/Sentry.AspNetCore.csproj +++ b/src/Sentry.AspNetCore/Sentry.AspNetCore.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0 + net9.0;net8.0 $(PackageTags);AspNetCore;MVC Official ASP.NET Core integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj b/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj index 7237feda50..7d04ce1a0b 100644 --- a/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj +++ b/src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj @@ -1,7 +1,7 @@ - net8.0;net6.0;netstandard2.0 + net8.0;netstandard2.0 $(PackageTags);Azure;Functions;Worker Official Azure Functions Worker SDK integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. @@ -16,7 +16,7 @@ - + diff --git a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj index e01605c30a..e011099d02 100644 --- a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj +++ b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0;netstandard2.0 + net9.0;net8.0;netstandard2.0 $(PackageTags);Logging;Microsoft.Extensions.Logging Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. @@ -20,17 +20,18 @@ - - - - - + + + + + + diff --git a/src/Sentry.Google.Cloud.Functions/Sentry.Google.Cloud.Functions.csproj b/src/Sentry.Google.Cloud.Functions/Sentry.Google.Cloud.Functions.csproj index 043a4a8d2c..b3961278f8 100644 --- a/src/Sentry.Google.Cloud.Functions/Sentry.Google.Cloud.Functions.csproj +++ b/src/Sentry.Google.Cloud.Functions/Sentry.Google.Cloud.Functions.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 $(PackageTags);GCP;Google Cloud Functions Official Google Cloud Functions integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.Hangfire/Sentry.Hangfire.csproj b/src/Sentry.Hangfire/Sentry.Hangfire.csproj index 3adcde449f..03ff86933d 100644 --- a/src/Sentry.Hangfire/Sentry.Hangfire.csproj +++ b/src/Sentry.Hangfire/Sentry.Hangfire.csproj @@ -3,7 +3,7 @@ Official Hangfire integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);Hangfire - net8.0;net6.0;net462 + net9.0;net8.0;net462 enable diff --git a/src/Sentry.Maui/Sentry.Maui.csproj b/src/Sentry.Maui/Sentry.Maui.csproj index a80c4dbbc1..ae2906bf64 100644 --- a/src/Sentry.Maui/Sentry.Maui.csproj +++ b/src/Sentry.Maui/Sentry.Maui.csproj @@ -3,7 +3,7 @@ Official MAUI integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. net9.0;net8.0 diff --git a/src/Sentry.NLog/Sentry.NLog.csproj b/src/Sentry.NLog/Sentry.NLog.csproj index 1fba6ee962..ba6ea63332 100644 --- a/src/Sentry.NLog/Sentry.NLog.csproj +++ b/src/Sentry.NLog/Sentry.NLog.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0;netstandard2.0;net462 + net9.0;net8.0;netstandard2.0;net462 $(PackageTags);Logging;NLog Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true diff --git a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj index e6031c0d0a..1af2c859eb 100644 --- a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj +++ b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj @@ -3,7 +3,7 @@ Official OpenTelemetry integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);OpenTelemetry - net8.0;net6.0;netstandard2.1;netstandard2.0;net462 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 enable diff --git a/src/Sentry.Profiling/Sentry.Profiling.csproj b/src/Sentry.Profiling/Sentry.Profiling.csproj index a057c79cf7..0d67c7291b 100644 --- a/src/Sentry.Profiling/Sentry.Profiling.csproj +++ b/src/Sentry.Profiling/Sentry.Profiling.csproj @@ -2,7 +2,7 @@ - net8.0;net6.0 + net9.0;net8.0 $(PackageTags);Profiling;Diagnostic Performance profiling support for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.Serilog/Sentry.Serilog.csproj b/src/Sentry.Serilog/Sentry.Serilog.csproj index d882c36d86..eca849fcd6 100644 --- a/src/Sentry.Serilog/Sentry.Serilog.csproj +++ b/src/Sentry.Serilog/Sentry.Serilog.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0;netstandard2.1;netstandard2.0;net462 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 $(PackageTags);Logging;Serilog Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true diff --git a/src/Sentry/Platforms/Native/Sentry.Native.targets b/src/Sentry/Platforms/Native/Sentry.Native.targets index 82886b970b..a69113be5e 100644 --- a/src/Sentry/Platforms/Native/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/Sentry.Native.targets @@ -46,7 +46,7 @@ - + @@ -56,7 +56,7 @@ built already on each native platform and fetched for the final .net build. --> diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index 649fd4853e..1162096802 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -8,10 +8,10 @@ - net8.0;net6.0;netstandard2.1;netstandard2.0;net462 - $(TargetFrameworks);net8.0-android34.0 - $(TargetFrameworks);net8.0-ios17.0 - $(TargetFrameworks);net8.0-maccatalyst17.0 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 + $(TargetFrameworks);net9.0-android35.0;net8.0-android34.0 + $(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0 + $(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0 @@ -28,8 +28,8 @@ true - - + + diff --git a/test/Sentry.Android.AssemblyReader.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Android.AssemblyReader.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..42c0fac236 --- /dev/null +++ b/test/Sentry.Android.AssemblyReader.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,12 @@ +namespace Sentry.Android.AssemblyReader +{ + public static class AndroidAssemblyReaderFactory + { + public static Sentry.Android.AssemblyReader.IAndroidAssemblyReader Open(string apkPath, System.Collections.Generic.IList supportedAbis, Sentry.Android.AssemblyReader.DebugLogger? logger = null) { } + } + public delegate void DebugLogger(string message, params object?[] args); + public interface IAndroidAssemblyReader : System.IDisposable + { + System.Reflection.PortableExecutable.PEReader? TryReadAssembly(string name); + } +} \ No newline at end of file diff --git a/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj b/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj index 9a003060a4..d6dd9fc202 100644 --- a/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj +++ b/test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj @@ -1,7 +1,7 @@ - net8.0;net6.0 + net9.0;net8.0 $(TargetFrameworks);net8.0-android34.0 enable diff --git a/test/Sentry.AspNetCore.Grpc.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.AspNetCore.Grpc.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..60439aee0e --- /dev/null +++ b/test/Sentry.AspNetCore.Grpc.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,50 @@ +namespace Sentry.AspNetCore.Grpc +{ + public class DefaultProtobufRequestPayloadExtractor : Sentry.AspNetCore.Grpc.IProtobufRequestPayloadExtractor + { + public DefaultProtobufRequestPayloadExtractor() { } + public Google.Protobuf.IMessage ExtractPayload(Sentry.AspNetCore.Grpc.IProtobufRequest request) + where TRequest : class, Google.Protobuf.IMessage { } + } + public interface IProtobufRequestPayloadExtractor + { + Google.Protobuf.IMessage? ExtractPayload(Sentry.AspNetCore.Grpc.IProtobufRequest request) + where TRequest : class, Google.Protobuf.IMessage; + } + public interface IProtobufRequest + { + long? ContentLength { get; } + TRequest Request { get; } + } + public class ProtobufRequestExtractionDispatcher : Sentry.AspNetCore.Grpc.IProtobufRequestPayloadExtractor + { + public ProtobufRequestExtractionDispatcher(System.Collections.Generic.IEnumerable extractors, Sentry.SentryOptions options, System.Func sizeSwitch) { } + public Google.Protobuf.IMessage? ExtractPayload(Sentry.AspNetCore.Grpc.IProtobufRequest request) + where TRequest : class, Google.Protobuf.IMessage { } + } + public static class ScopeExtensions + { + public static void Populate(this Sentry.Scope scope, Grpc.Core.ServerCallContext context, TRequest? request, Sentry.AspNetCore.SentryAspNetCoreOptions options) + where TRequest : class { } + } + public static class SentryBuilderExtensions + { + public static Sentry.AspNetCore.ISentryBuilder AddGrpc(this Sentry.AspNetCore.ISentryBuilder builder) { } + } + public class SentryGrpcInterceptor : Grpc.Core.Interceptors.Interceptor + { + public SentryGrpcInterceptor(System.Func hubAccessor, Microsoft.Extensions.Options.IOptions options) { } + public override System.Threading.Tasks.Task ClientStreamingServerHandler(Grpc.Core.IAsyncStreamReader requestStream, Grpc.Core.ServerCallContext context, Grpc.Core.ClientStreamingServerMethod continuation) + where TRequest : class + where TResponse : class { } + public override System.Threading.Tasks.Task DuplexStreamingServerHandler(Grpc.Core.IAsyncStreamReader requestStream, Grpc.Core.IServerStreamWriter responseStream, Grpc.Core.ServerCallContext context, Grpc.Core.DuplexStreamingServerMethod continuation) + where TRequest : class + where TResponse : class { } + public override System.Threading.Tasks.Task ServerStreamingServerHandler(TRequest request, Grpc.Core.IServerStreamWriter responseStream, Grpc.Core.ServerCallContext context, Grpc.Core.ServerStreamingServerMethod continuation) + where TRequest : class + where TResponse : class { } + public override System.Threading.Tasks.Task UnaryServerHandler(TRequest request, Grpc.Core.ServerCallContext context, Grpc.Core.UnaryServerMethod continuation) + where TRequest : class + where TResponse : class { } + } +} \ No newline at end of file diff --git a/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj b/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj index 5d1ba3482c..24227ac339 100644 --- a/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj +++ b/test/Sentry.AspNetCore.Grpc.Tests/Sentry.AspNetCore.Grpc.Tests.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj index e2221aa14a..696fb19b39 100644 --- a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj +++ b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 false @@ -41,25 +41,18 @@ - - - - - - - - + - + - + - - - + + + diff --git a/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..5f9eab70e9 --- /dev/null +++ b/test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,83 @@ +namespace Microsoft.AspNetCore.Builder +{ + public static class SentryTracingMiddlewareExtensions + { + public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseSentryTracing(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) { } + } +} +namespace Microsoft.AspNetCore.Hosting +{ + public static class SentryWebHostBuilderExtensions + { + public static void AddSentryTunneling(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, params string[] hostnames) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, System.Action? configureSentry) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, System.Action? configureOptions) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, System.Action? configureSentry) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, System.Action? configureOptions) { } + public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseSentry(this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, string dsn) { } + public static void UseSentryTunneling(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder, string path = "/tunnel") { } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static class ServiceCollectionExtensions + { + public static Sentry.AspNetCore.ISentryBuilder AddSentry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { } + } +} +namespace Sentry.AspNetCore +{ + public interface ISentryBuilder + { + Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; } + } + public static class SamplingExtensions + { + public static Microsoft.AspNetCore.Http.HttpContext? TryGetHttpContext(this Sentry.TransactionSamplingContext samplingContext) { } + public static string? TryGetHttpMethod(this Sentry.TransactionSamplingContext samplingContext) { } + public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { } + public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { } + } + public static class ScopeExtensions + { + public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { } + public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { } + } + [Microsoft.Extensions.Logging.ProviderAlias("Sentry")] + public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider + { + public SentryAspNetCoreLoggerProvider(Microsoft.Extensions.Options.IOptions options, Sentry.IHub hub) { } + } + public class SentryAspNetCoreOptions : Sentry.Extensions.Logging.SentryLoggingOptions + { + public SentryAspNetCoreOptions() { } + public bool AdjustStandardEnvironmentNameCasing { get; set; } + public bool AutoRegisterTracing { get; set; } + public bool CaptureBlockingCalls { get; set; } + public bool FlushOnCompletedRequest { get; set; } + public bool IncludeActivityData { get; set; } + public Sentry.Extensibility.RequestSize MaxRequestBodySize { get; set; } + public Sentry.AspNetCore.TransactionNameProvider? TransactionNameProvider { get; set; } + } + public class SentryAspNetCoreOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions + { + public SentryAspNetCoreOptionsSetup(Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration providerConfiguration) { } + public void Configure(Sentry.AspNetCore.SentryAspNetCoreOptions options) { } + } + public static class SentryBuilderExtensions + { + public static Sentry.AspNetCore.ISentryBuilder AddSentryOptions(this Sentry.AspNetCore.ISentryBuilder builder, System.Action? configureOptions) { } + } + public class SentryStartupFilter : Microsoft.AspNetCore.Hosting.IStartupFilter + { + public SentryStartupFilter() { } + public System.Action Configure(System.Action next) { } + } + public class SentryTunnelMiddleware : Microsoft.AspNetCore.Http.IMiddleware + { + public SentryTunnelMiddleware(string[] allowedHosts) { } + public System.Threading.Tasks.Task InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.RequestDelegate next) { } + } + public delegate string? TransactionNameProvider(Microsoft.AspNetCore.Http.HttpContext context); +} \ No newline at end of file diff --git a/test/Sentry.AspNetCore.Tests/Sentry.AspNetCore.Tests.csproj b/test/Sentry.AspNetCore.Tests/Sentry.AspNetCore.Tests.csproj index ee66f9fe0e..0761e91aa6 100644 --- a/test/Sentry.AspNetCore.Tests/Sentry.AspNetCore.Tests.csproj +++ b/test/Sentry.AspNetCore.Tests/Sentry.AspNetCore.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet.verified.txt b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet.verified.txt new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet.verified.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.verified.txt b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet8_0.verified.txt similarity index 100% rename from test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.verified.txt rename to test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet8_0.verified.txt diff --git a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet9_0.verified.txt b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet9_0.verified.txt new file mode 100644 index 0000000000..679694a306 --- /dev/null +++ b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.PreFlightIgnoresTransaction.DotNet9_0.verified.txt @@ -0,0 +1,14 @@ +{ + result: { + Status: 204 No Content, + Headers: { + Access-Control-Allow-Headers: origin, + Access-Control-Allow-Methods: GET, + Access-Control-Allow-Origin: * + }, + Content: { + Headers: {} + } + }, + Payloads: [] +} \ No newline at end of file diff --git a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.Versioning.DotNet9_0.verified.txt b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.Versioning.DotNet9_0.verified.txt new file mode 100644 index 0000000000..a75596e368 --- /dev/null +++ b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.Versioning.DotNet9_0.verified.txt @@ -0,0 +1,92 @@ +{ + result: Hello world, + Payloads: [ + { + Source: { + Origin: auto.http.aspnetcore, + Name: GET /v1.1/Target, + NameSource: Route, + Platform: csharp, + Operation: http.server, + Description: , + Status: Ok, + IsSampled: true, + SampleRate: 1.0, + Request: { + Method: GET, + QueryString: + }, + Contexts: { + trace: { + Operation: http.server, + Origin: auto.http.aspnetcore, + Description: , + Status: Ok, + IsSampled: true + } + }, + User: { + Id: Guid_1, + IpAddress: {{auto}} + }, + Environment: production, + Breadcrumbs: [ + { + Message: Request starting HTTP/1.1 GET http://localhost/v1.1/Target - - -, + Data: { + eventId: 1 + }, + Category: Microsoft.AspNetCore.Hosting.Diagnostics + }, + { + Message: Executing endpoint 'Sentry.AspNetCore.Tests.WebIntegrationTests+VersionController.Method (Sentry.AspNetCore.Tests)', + Data: { + eventId: ExecutingEndpoint + }, + Category: Microsoft.AspNetCore.Routing.EndpointMiddleware + }, + { + Message: Route matched with {action = "Method", controller = "Version"}. Executing controller action with signature System.String Method() on controller Sentry.AspNetCore.Tests.WebIntegrationTests+VersionController (Sentry.AspNetCore.Tests)., + Data: { + eventId: ControllerActionExecuting + }, + Category: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker + }, + { + Message: Executing ObjectResult, writing value of type 'System.String'., + Data: { + eventId: ObjectResultExecuting + }, + Category: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor + }, + { + Message: Executed action Sentry.AspNetCore.Tests.WebIntegrationTests+VersionController.Method, + Data: { + eventId: ActionExecuted + }, + Category: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker + }, + { + Message: Executed endpoint 'Sentry.AspNetCore.Tests.WebIntegrationTests+VersionController.Method (Sentry.AspNetCore.Tests)', + Data: { + eventId: ExecutedEndpoint + }, + Category: Microsoft.AspNetCore.Routing.EndpointMiddleware + } + ], + Extra: { + http.request.method: GET, + http.response.status_code: 200 + }, + Tags: { + ActionId: Guid_2, + ActionName: Sentry.AspNetCore.Tests.WebIntegrationTests+VersionController.Method (Sentry.AspNetCore.Tests), + route.action: Method, + route.controller: Version, + route.version: 1.1 + }, + IsFinished: true + } + } + ] +} \ No newline at end of file diff --git a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.verify.cs b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.verify.cs index 18138d595b..107848062d 100644 --- a/test/Sentry.AspNetCore.Tests/WebIntegrationTests.verify.cs +++ b/test/Sentry.AspNetCore.Tests/WebIntegrationTests.verify.cs @@ -136,7 +136,8 @@ public async Task PreFlightIgnoresTransaction() await Verify(new { result, transport.Payloads }) .IgnoreStandardSentryMembers() - .ScrubAspMembers(); + .ScrubAspMembers() + .UniqueForTargetFrameworkAndVersion(); } [ApiController] diff --git a/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj index 6bad6ee23e..fa52c80252 100644 --- a/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj +++ b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0;net48 + net8.0;net48 diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj index d395ccdc54..f9bb661a84 100644 --- a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj +++ b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj @@ -1,9 +1,16 @@  - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 + + + + + + + @@ -11,25 +18,6 @@ - - - - - - - - - - - - diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.LoggingAsync.DotNet9_0.verified.txt b/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.LoggingAsync.DotNet9_0.verified.txt new file mode 100644 index 0000000000..2eebc2dae0 --- /dev/null +++ b/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.LoggingAsync.DotNet9_0.verified.txt @@ -0,0 +1,64 @@ +[ + { + Source: { + Name: my transaction, + Platform: csharp, + Operation: my operation, + Description: , + Status: Ok, + IsSampled: true, + SampleRate: 1.0, + Request: {}, + Contexts: { + trace: { + Operation: my operation, + Description: , + Status: Ok, + IsSampled: true + } + }, + User: { + Id: Guid_1, + IpAddress: {{auto}} + }, + Spans: [ + { + IsFinished: true, + Operation: db.connection, + Description: SqlListenerTests.verify_LoggingAsync, + Status: Ok, + IsSampled: true, + Extra: { + bytes_sent : 376, + db.connection_id: Guid_2, + db.name: SqlListenerTests.verify_LoggingAsync, + db.operation_id: Guid_3, + db.server: (LocalDb)\SqlListenerTests, + db.system: sql, + rows_sent: 0 + } + }, + { + IsFinished: true, + Operation: db.query, + Description: +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [TestEntities] ([Property]) +OUTPUT INSERTED.[Id] +VALUES (@p0); +, + Status: Ok, + IsSampled: true, + Extra: { + db.connection_id: Guid_2, + db.name: SqlListenerTests.verify_LoggingAsync, + db.operation_id: Guid_4, + db.system: sql + } + } + ], + IsFinished: true + } + } +] \ No newline at end of file diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.DotNet9_0.verified.txt b/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.DotNet9_0.verified.txt new file mode 100644 index 0000000000..5c1985dbc1 --- /dev/null +++ b/test/Sentry.DiagnosticSource.IntegrationTests/SqlListenerTests.RecordsEfAsync.DotNet9_0.verified.txt @@ -0,0 +1,125 @@ +[ + { + Source: { + Exception: { + $type: Exception, + Type: Exception, + Message: my exception + }, + Platform: csharp, + SentryExceptions: [ + { + Type: System.Exception, + Value: my exception + } + ], + Level: error, + TransactionName: my transaction, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: Guid_1, + IpAddress: {{auto}} + } + } + }, + { + Source: { + Name: my transaction, + Platform: csharp, + Operation: my operation, + Description: , + Status: Ok, + IsSampled: true, + SampleRate: 1.0, + Request: {}, + Contexts: { + trace: { + Operation: my operation, + Description: , + Status: Ok, + IsSampled: true + } + }, + User: { + Id: Guid_1, + IpAddress: {{auto}} + }, + Breadcrumbs: [ + { + Message: my exception, + Category: Exception, + Level: critical + } + ], + Spans: [ + { + IsFinished: true, + Operation: db.connection, + Description: SqlListenerTests.verify_RecordsEfAsync, + Status: Ok, + IsSampled: true, + Extra: { + bytes_received: 225, + bytes_sent : 570, + db.connection_id: Guid_2, + db.name: SqlListenerTests.verify_RecordsEfAsync, + db.operation_id: Guid_3, + db.server: (LocalDb)\SqlListenerTests, + db.system: sql, + rows_sent: 1 + } + }, + { + IsFinished: true, + Operation: db.query, + Description: +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [TestEntities] ([Property]) +OUTPUT INSERTED.[Id] +VALUES (@p0); +, + Status: Ok, + IsSampled: true, + Extra: { + db.connection_id: Guid_2, + db.name: SqlListenerTests.verify_RecordsEfAsync, + db.operation_id: Guid_4, + db.system: sql + } + }, + { + IsFinished: true, + Operation: db.query.compile, + Description: 'DbSet()', + Status: Ok, + IsSampled: true, + Extra: { + db.system: mssql + } + }, + { + IsFinished: true, + Operation: db.query, + Description: +SELECT [t].[Id], [t].[Property] +FROM [TestEntities] AS [t], + Status: Ok, + IsSampled: true, + Extra: { + db.connection_id: Guid_2, + db.name: SqlListenerTests.verify_RecordsEfAsync, + db.operation_id: Guid_5, + db.system: sql + } + } + ], + IsFinished: true + } + } +] \ No newline at end of file diff --git a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj index 500062fcdc..89516e5ebb 100644 --- a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj +++ b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj @@ -1,9 +1,15 @@  - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 + + + + + + @@ -12,20 +18,6 @@ - - - - - - - - - - - - - - diff --git a/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..53cafe92cc --- /dev/null +++ b/test/Sentry.EntityFramework.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,39 @@ +namespace Sentry.EntityFramework.ErrorProcessors +{ + public class DbConcurrencyExceptionProcessor : Sentry.Extensibility.SentryEventExceptionProcessor + { + public DbConcurrencyExceptionProcessor() { } + protected override void ProcessException(System.Data.DBConcurrencyException exception, Sentry.SentryEvent sentryEvent) { } + } + public class DbEntityValidationExceptionProcessor : Sentry.Extensibility.SentryEventExceptionProcessor + { + public DbEntityValidationExceptionProcessor() { } + protected override void ProcessException(System.Data.Entity.Validation.DbEntityValidationException exception, Sentry.SentryEvent sentryEvent) { } + } +} +namespace Sentry.EntityFramework +{ + public interface IQueryLogger + { + void Log(string text, Sentry.BreadcrumbLevel level = -1); + } + public class SentryCommandInterceptor : System.Data.Entity.Infrastructure.Interception.IDbCommandInterceptor, System.Data.Entity.Infrastructure.Interception.IDbInterceptor + { + public SentryCommandInterceptor(Sentry.EntityFramework.IQueryLogger queryLogger) { } + public virtual void Log(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void NonQueryExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void NonQueryExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void ReaderExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void ReaderExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void ScalarExecuted(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + public void ScalarExecuting(System.Data.Common.DbCommand command, System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext) { } + } +} +namespace Sentry +{ + public static class SentryOptionsExtensions + { + public static Sentry.SentryOptions AddEntityFramework(this Sentry.SentryOptions sentryOptions) { } + public static void DisableDbInterceptionIntegration(this Sentry.SentryOptions options) { } + } +} \ No newline at end of file diff --git a/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj b/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj index e2d4c6a37d..a4bca32985 100644 --- a/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj +++ b/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 diff --git a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj index 7a67293a6d..947d10b537 100644 --- a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj +++ b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;net6.0;net48 + net9.0;net8.0;net48 $(TargetFrameworks);net8.0-android34.0 $(TargetFrameworks);net8.0-ios17.0 $(TargetFrameworks);net8.0-maccatalyst17.0 diff --git a/test/Sentry.Google.Cloud.Functions.Tests/Sentry.Google.Cloud.Functions.Tests.csproj b/test/Sentry.Google.Cloud.Functions.Tests/Sentry.Google.Cloud.Functions.Tests.csproj index 87bbc988bd..0e877187df 100644 --- a/test/Sentry.Google.Cloud.Functions.Tests/Sentry.Google.Cloud.Functions.Tests.csproj +++ b/test/Sentry.Google.Cloud.Functions.Tests/Sentry.Google.Cloud.Functions.Tests.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net8.0 diff --git a/test/Sentry.Hangfire.Tests/Sentry.Hangfire.Tests.csproj b/test/Sentry.Hangfire.Tests/Sentry.Hangfire.Tests.csproj index 3a8c5399ab..15a9d7f0c8 100644 --- a/test/Sentry.Hangfire.Tests/Sentry.Hangfire.Tests.csproj +++ b/test/Sentry.Hangfire.Tests/Sentry.Hangfire.Tests.csproj @@ -3,7 +3,7 @@ - net8.0;net6.0 + net9.0;net8.0 enable diff --git a/test/Sentry.Log4Net.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Log4Net.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..117659776a --- /dev/null +++ b/test/Sentry.Log4Net.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,14 @@ +[assembly: System.CLSCompliant(true)] +namespace Sentry.Log4Net +{ + public class SentryAppender : log4net.Appender.AppenderSkeleton + { + public SentryAppender() { } + public string? Dsn { get; set; } + public string? Environment { get; set; } + public log4net.Core.Level? MinimumEventLevel { get; set; } + public bool SendIdentity { get; set; } + protected override void Append(log4net.Core.LoggingEvent loggingEvent) { } + protected override void OnClose() { } + } +} \ No newline at end of file diff --git a/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj b/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj index 896c417872..b8d686aefd 100644 --- a/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj +++ b/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj @@ -1,7 +1,8 @@  - net8.0;net7.0;net6.0;net48 + + net8.0;net48 diff --git a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..00a36bc53b --- /dev/null +++ b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,81 @@ +[assembly: System.CLSCompliant(true)] +namespace NLog +{ + public static class ConfigurationExtensions + { + public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, System.Action? optionsConfig = null) { } + public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, System.Action? optionsConfig = null) { } + public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, string targetName, System.Action? optionsConfig = null) { } + public static void AddTag(this Sentry.NLog.SentryNLogOptions options, string name, NLog.Layouts.Layout layout) { } + } +} +namespace Sentry.NLog +{ + [NLog.Config.NLogConfigurationItem] + public class SentryNLogOptions : Sentry.SentryOptions + { + public SentryNLogOptions() { } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? BreadcrumbCategoryLayout { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? BreadcrumbLayout { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? DsnLayout { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? EnvironmentLayout { get; set; } + public bool IgnoreEventsWithNoException { get; set; } + public bool IncludeEventDataOnBreadcrumbs { get; set; } + public bool IncludeEventPropertiesAsTags { get; set; } + public bool InitializeSdk { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? Layout { get; set; } + public NLog.LogLevel? MinimumBreadcrumbLevel { get; set; } + public NLog.LogLevel? MinimumEventLevel { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public NLog.Layouts.Layout? ReleaseLayout { get; set; } + public int ShutdownTimeoutSeconds { get; set; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public System.Collections.Generic.IList Tags { get; } + [NLog.Config.NLogConfigurationIgnoreProperty] + public Sentry.NLog.SentryNLogUser? User { get; set; } + } + [NLog.Config.NLogConfigurationItem] + public class SentryNLogUser + { + public SentryNLogUser() { } + public NLog.Layouts.Layout? Email { get; set; } + public NLog.Layouts.Layout? Id { get; set; } + public NLog.Layouts.Layout? IpAddress { get; set; } + [NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")] + public System.Collections.Generic.IList? Other { get; } + public NLog.Layouts.Layout? Segment { get; set; } + public NLog.Layouts.Layout? Username { get; set; } + } + [NLog.Targets.Target("Sentry")] + public sealed class SentryTarget : NLog.Targets.TargetWithContext + { + public SentryTarget() { } + public SentryTarget(Sentry.NLog.SentryNLogOptions options) { } + public NLog.Layouts.Layout? BreadcrumbCategory { get; set; } + public NLog.Layouts.Layout? BreadcrumbLayout { get; set; } + public NLog.Layouts.Layout? Dsn { get; set; } + public NLog.Layouts.Layout? Environment { get; set; } + public int FlushTimeoutSeconds { get; set; } + public bool IgnoreEventsWithNoException { get; set; } + public bool IncludeEventDataOnBreadcrumbs { get; set; } + public bool IncludeEventPropertiesAsTags { get; set; } + public bool InitializeSdk { get; set; } + public string MinimumBreadcrumbLevel { get; set; } + public string MinimumEventLevel { get; set; } + public Sentry.NLog.SentryNLogOptions Options { get; } + public NLog.Layouts.Layout? Release { get; set; } + public int ShutdownTimeoutSeconds { get; set; } + [NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext), "tag")] + public System.Collections.Generic.IList Tags { get; } + public Sentry.NLog.SentryNLogUser? User { get; set; } + protected override void CloseTarget() { } + protected override void FlushAsync(NLog.Common.AsyncContinuation asyncContinuation) { } + protected override void InitializeTarget() { } + protected override void Write(NLog.LogEventInfo logEvent) { } + } +} \ No newline at end of file diff --git a/test/Sentry.NLog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt b/test/Sentry.NLog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt new file mode 100644 index 0000000000..0546a4fe28 --- /dev/null +++ b/test/Sentry.NLog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt @@ -0,0 +1,106 @@ +[ + { + Header: { + event_id: Guid_1, + sdk: { + name: sentry.dotnet + }, + trace: { + environment: production, + public_key: d4d82fc1c2c4032a83f3a29aa3a3aff, + release: test-release, + trace_id: Guid_2 + } + }, + Items: [ + { + Header: { + type: event + }, + Payload: { + Source: { + Exception: { + $type: Exception, + Type: Exception, + Message: Exception message + }, + Message: { + Message: message = {arg}, + Formatted: message = "arg value" + }, + Logger: Sentry.NLog.Tests.IntegrationTests, + Platform: csharp, + SentryExceptions: [ + { + Type: System.Exception, + Value: Exception message, + Stacktrace: { + Frames: [ + { + FileName: IntegrationTests.verify.cs, + Function: Task IntegrationTests.Simple(), + Module: null, + LineNumber: 52, + ColumnNumber: 17, + AbsolutePath: {ProjectDirectory}IntegrationTests.verify.cs, + ContextLine: null, + InApp: false, + Package: Sentry.NLog.Tests, Version=SCRUBBED, Culture=SCRUBBED, PublicKeyToken=SCRUBBED, + Platform: null, + ImageAddress: null, + SymbolAddress: null, + InstructionAddress: 2, + AddressMode: rel:0, + FunctionId: 1 + } + ] + }, + Mechanism: { + Type: generic, + Handled: true, + Synthetic: false, + IsExceptionGroup: false + } + } + ], + DebugImages: [ + { + Type: pe_dotnet, + ImageAddress: null, + ImageSize: null, + DebugId: ________-____-____-____-____________-________, + DebugChecksum: ______:________________________________________________________________, + DebugFile: .../Sentry.NLog.Tests.pdb, + CodeId: ______________, + CodeFile: .../Sentry.NLog.Tests.dll + } + ], + Level: error, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: myId, + Username: , + Email: , + IpAddress: , + Other: { + mood: joyous + } + }, + Environment: production, + Extra: { + arg: arg value + }, + Tags: { + logger: Sentry.NLog.Tests.IntegrationTests + } + } + } + } + ] + } +] \ No newline at end of file diff --git a/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj b/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj index 99d1ddcc79..607b580e48 100644 --- a/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj +++ b/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 diff --git a/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj b/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj index c58aa8da53..823005c757 100644 --- a/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj +++ b/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 @@ -9,12 +9,12 @@ - - + + - + diff --git a/test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj b/test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj index ceaf10debb..932f6231e1 100644 --- a/test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj +++ b/test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0 + net9.0;net8.0 enable diff --git a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt new file mode 100644 index 0000000000..893bc8a67e --- /dev/null +++ b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -0,0 +1,46 @@ +[assembly: System.CLSCompliant(true)] +namespace Sentry.Serilog +{ + public class SentrySerilogOptions : Sentry.SentryOptions + { + public SentrySerilogOptions() { } + public System.IFormatProvider? FormatProvider { get; set; } + public bool InitializeSdk { get; set; } + public Serilog.Events.LogEventLevel MinimumBreadcrumbLevel { get; set; } + public Serilog.Events.LogEventLevel MinimumEventLevel { get; set; } + public Serilog.Formatting.ITextFormatter? TextFormatter { get; set; } + } +} +namespace Serilog +{ + public static class SentrySinkExtensions + { + public static Serilog.LoggerConfiguration Sentry(this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration, System.Action configureOptions) { } + public static Serilog.LoggerConfiguration Sentry(this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration, Serilog.Events.LogEventLevel? minimumEventLevel = default, Serilog.Events.LogEventLevel? minimumBreadcrumbLevel = default, System.IFormatProvider? formatProvider = null, Serilog.Formatting.ITextFormatter? textFormatter = null) { } + public static Serilog.LoggerConfiguration Sentry( + this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration, + string dsn, + Serilog.Events.LogEventLevel? minimumBreadcrumbLevel = default, + Serilog.Events.LogEventLevel? minimumEventLevel = default, + System.IFormatProvider? formatProvider = null, + Serilog.Formatting.ITextFormatter? textFormatter = null, + bool? sendDefaultPii = default, + bool? isEnvironmentUser = default, + string? serverName = null, + bool? attachStackTrace = default, + int? maxBreadcrumbs = default, + float? sampleRate = default, + string? release = null, + string? environment = null, + int? maxQueueItems = default, + System.TimeSpan? shutdownTimeout = default, + System.Net.DecompressionMethods? decompressionMethods = default, + System.IO.Compression.CompressionLevel? requestBodyCompressionLevel = default, + bool? requestBodyCompressionBuffered = default, + bool? debug = default, + Sentry.SentryLevel? diagnosticLevel = default, + Sentry.ReportAssembliesMode? reportAssembliesMode = default, + Sentry.DeduplicateMode? deduplicateMode = default, + System.Collections.Generic.Dictionary? defaultTags = null) { } + } +} \ No newline at end of file diff --git a/test/Sentry.Serilog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt b/test/Sentry.Serilog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt new file mode 100644 index 0000000000..1f894bd0ef --- /dev/null +++ b/test/Sentry.Serilog.Tests/IntegrationTests.Simple.DotNet9_0.verified.txt @@ -0,0 +1,280 @@ +[ + { + Header: { + event_id: Guid_1, + sdk: { + name: sentry.dotnet + }, + trace: { + environment: production, + public_key: d4d82fc1c2c4032a83f3a29aa3a3aff, + release: test-release, + trace_id: Guid_2 + } + }, + Items: [ + { + Header: { + type: event + }, + Payload: { + Source: { + Message: { + Message: Debug message stored as breadcrumb., + Formatted: [42] Debug message stored as breadcrumb. + }, + Platform: csharp, + ServerName: TheMachineName, + Level: debug, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: Guid_3, + Username: TheUserName, + IpAddress: {{auto}} + }, + Environment: production, + Extra: { + inventory: { SmallPotion = 3, BigPotion = 0, CheeseWheels = 512 }, + MyTaskId: 42 + } + } + } + } + ] + }, + { + Header: { + event_id: Guid_4, + sdk: { + name: sentry.dotnet + }, + trace: { + environment: production, + public_key: d4d82fc1c2c4032a83f3a29aa3a3aff, + release: test-release, + trace_id: Guid_2 + } + }, + Items: [ + { + Header: { + type: event + }, + Payload: { + Source: { + Message: { + Message: Message with a different MyTaskId, + Formatted: [65] Message with a different MyTaskId + }, + Platform: csharp, + ServerName: TheMachineName, + Level: debug, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: Guid_3, + Username: TheUserName, + IpAddress: {{auto}} + }, + Environment: production, + Breadcrumbs: [ + { + Message: [42] Debug message stored as breadcrumb., + Level: debug + } + ], + Extra: { + inventory: { SmallPotion = 3, BigPotion = 0, CheeseWheels = 512 }, + MyTaskId: 65 + } + } + } + } + ] + }, + { + Header: { + event_id: Guid_5, + sdk: { + name: sentry.dotnet + }, + trace: { + environment: production, + public_key: d4d82fc1c2c4032a83f3a29aa3a3aff, + release: test-release, + trace_id: Guid_2 + } + }, + Items: [ + { + Header: { + type: event + }, + Payload: { + Source: { + Message: { + Message: Some event that includes the previous breadcrumbs, + Formatted: [42] Some event that includes the previous breadcrumbs + }, + Platform: csharp, + ServerName: TheMachineName, + Level: error, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: Guid_3, + Username: TheUserName, + IpAddress: {{auto}} + }, + Environment: production, + Breadcrumbs: [ + { + Message: [42] Debug message stored as breadcrumb., + Level: debug + }, + { + Message: [65] Message with a different MyTaskId, + Level: debug + } + ], + Extra: { + inventory: { SmallPotion = 3, BigPotion = 0, CheeseWheels = 512 }, + MyTaskId: 42 + } + } + } + } + ] + }, + { + Header: { + event_id: Guid_6, + sdk: { + name: sentry.dotnet + }, + trace: { + environment: production, + public_key: d4d82fc1c2c4032a83f3a29aa3a3aff, + release: test-release, + trace_id: Guid_2 + } + }, + Items: [ + { + Header: { + type: event + }, + Payload: { + Source: { + Exception: { + $type: Exception, + Type: Exception, + Message: Exception message, + Data: { + details: Do work always throws. + } + }, + Message: { + Message: Error: with exception, + Formatted: [42] Error: with exception + }, + Platform: csharp, + ServerName: TheMachineName, + SentryExceptions: [ + { + Type: System.Exception, + Value: Exception message, + Stacktrace: { + Frames: [ + { + FileName: IntegrationTests.verify.cs, + Function: Task IntegrationTests.Simple(), + Module: null, + LineNumber: 47, + ColumnNumber: 17, + AbsolutePath: {ProjectDirectory}IntegrationTests.verify.cs, + ContextLine: null, + InApp: false, + Package: Sentry.Serilog.Tests, Version=SCRUBBED, Culture=SCRUBBED, PublicKeyToken=SCRUBBED, + Platform: null, + ImageAddress: null, + SymbolAddress: null, + InstructionAddress: 2, + AddressMode: rel:0, + FunctionId: 1 + } + ] + }, + Mechanism: { + Type: generic, + Handled: true, + Synthetic: false, + IsExceptionGroup: false, + Data: { + details: Do work always throws. + } + } + } + ], + DebugImages: [ + { + Type: pe_dotnet, + ImageAddress: null, + ImageSize: null, + DebugId: ________-____-____-____-____________-________, + DebugChecksum: ______:________________________________________________________________, + DebugFile: .../Sentry.Serilog.Tests.pdb, + CodeId: ______________, + CodeFile: .../Sentry.Serilog.Tests.dll + } + ], + Level: fatal, + Request: {}, + Contexts: { + trace: { + Operation: + } + }, + User: { + Id: Guid_3, + Username: TheUserName, + IpAddress: {{auto}} + }, + Environment: production, + Breadcrumbs: [ + { + Message: [42] Debug message stored as breadcrumb., + Level: debug + }, + { + Message: [65] Message with a different MyTaskId, + Level: debug + }, + { + Message: [42] Some event that includes the previous breadcrumbs, + Level: error + } + ], + Extra: { + inventory: { SmallPotion = 3, BigPotion = 0, CheeseWheels = 512 }, + MyTaskId: 42 + } + } + } + } + ] + } +] \ No newline at end of file diff --git a/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj b/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj index 49e4c06539..3929da11fd 100644 --- a/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj +++ b/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 diff --git a/test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj b/test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj index 4a2fdcd63b..227a7e1f0d 100644 --- a/test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj +++ b/test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj @@ -2,7 +2,7 @@ Exe - net8.0;net7.0;net6.0;net48 + net9.0;net8.0;net48 diff --git a/test/Sentry.Testing/Sentry.Testing.csproj b/test/Sentry.Testing/Sentry.Testing.csproj index 29262aa2cc..8fbe7f01f1 100644 --- a/test/Sentry.Testing/Sentry.Testing.csproj +++ b/test/Sentry.Testing/Sentry.Testing.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;net6.0;net48 + net9.0;net8.0;net48 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0 @@ -23,7 +23,7 @@ - + diff --git a/test/Sentry.Tests/Sentry.Tests.csproj b/test/Sentry.Tests/Sentry.Tests.csproj index 01032ccb80..d2c5db0dfc 100644 --- a/test/Sentry.Tests/Sentry.Tests.csproj +++ b/test/Sentry.Tests/Sentry.Tests.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;net6.0;net48 + net9.0;net8.0;net48 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0 diff --git a/test/SingleFileTestApp/SingleFileTestApp.csproj b/test/SingleFileTestApp/SingleFileTestApp.csproj index 123c265621..87988ebd8a 100644 --- a/test/SingleFileTestApp/SingleFileTestApp.csproj +++ b/test/SingleFileTestApp/SingleFileTestApp.csproj @@ -3,7 +3,7 @@ false Exe - net6.0 + net8.0 11 true true