diff --git a/CHANGELOG.md b/CHANGELOG.md index c980dfff62..a9362434ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,12 +27,12 @@ API Changes: - Removed unused `StackFrame.InstructionOffset`. ([#2691](https://github.com/getsentry/sentry-dotnet/pull/2691)) - Change `StackFrame`'s `ImageAddress`, `InstructionAddress` and `FunctionId` to `long?`. ([#2691](https://github.com/getsentry/sentry-dotnet/pull/2691)) - Change `DebugImage.ImageAddress` to `long?`. ([#2725](https://github.com/getsentry/sentry-dotnet/pull/2725)) -- Enable `CaptureFailedRequests` by default ([2688](https://github.com/getsentry/sentry-dotnet/pull/2688)) +- Enable `CaptureFailedRequests` by default ([#2688](https://github.com/getsentry/sentry-dotnet/pull/2688)) - Additional constructors removed from `TransactionTracer`. ([#2694](https://github.com/getsentry/sentry-dotnet/pull/2694)) - Removed the `Scope.Platform` property as it was never applied. ([#2695](https://github.com/getsentry/sentry-dotnet/pull/2695)) - Reordered parameters for ther TransactionContext and SpanContext constructors. If you're constructing instances of these classes, you will need to adjust the order in which you pass parameters to these. ([#2696](https://github.com/getsentry/sentry-dotnet/pull/2696)) - The `DiagnosticLogger` signature for `LogError` and `LogFatal` changed to take the `exception` as the first parameter. That way it does no longer get mixed up with the TArgs. The `DiagnosticLogger` now also received an overload for `LogError` and `LogFatal` that accepts a message only. ([#2715](https://github.com/getsentry/sentry-dotnet/pull/2715)) -- Integrate `sentry-native` as a static library in Native AOT builds to enable symbolication. ([2704](https://github.com/getsentry/sentry-dotnet/pull/2704)) +- Integrate `sentry-native` as a static library in Native AOT builds to enable symbolication. ([#2704](https://github.com/getsentry/sentry-dotnet/pull/2704)) - Contexts now inherits from `IDictionary` rather than `ConcurrentDictionary`. The specific dictionary being used is an implementation detail. ([#2729](https://github.com/getsentry/sentry-dotnet/pull/2729)) - `ISentryClient.CaptureEvent` overloads have been replaced by a single method accepting optional `Hint` and `Scope` parameters. You will need to pass `hint` as a named parameter from code that calls `CaptureEvent` without passing a `scope` argument. ([#2749](https://github.com/getsentry/sentry-dotnet/pull/2749)) - The methods `WithScope` and `WithScopeAsync` have been removed. We discovered that these methods didn't work correctly in certain desktop contexts, especially when using a global scope. ([#2717](https://github.com/getsentry/sentry-dotnet/pull/2717)) @@ -59,7 +59,8 @@ API Changes: }); ``` - `ISpan` and `ITransaction` have been renamed to `ISpanTracer` and `ITransactionTracer`. You will need to update any references to these interfaces in your code to use the new interface names ([#2731](https://github.com/getsentry/sentry-dotnet/pull/2731)) -- Removed obsolete setter from `Sentry.PlatformAbstractions.Runtime.Identifier` ([2764](https://github.com/getsentry/sentry-dotnet/pull/2764)) +- Removed obsolete setter from `Sentry.PlatformAbstractions.Runtime.Identifier` ([#2764](https://github.com/getsentry/sentry-dotnet/pull/2764)) +- `Sentry.Values` is now internal as it is never exposed in the public API ([#2771](https://github.com/getsentry/sentry-dotnet/pull/2771)) ## Unreleased @@ -113,8 +114,8 @@ API Changes: ### Features -- Reduced the memory footprint of `SpanId` by refactoring the ID generation ([2619](https://github.com/getsentry/sentry-dotnet/pull/2619)) -- Reduced the memory footprint of `SpanTracer` by initializing the tags lazily ([2636](https://github.com/getsentry/sentry-dotnet/pull/2636)) +- Reduced the memory footprint of `SpanId` by refactoring the ID generation ([#2619](https://github.com/getsentry/sentry-dotnet/pull/2619)) +- Reduced the memory footprint of `SpanTracer` by initializing the tags lazily ([#2636](https://github.com/getsentry/sentry-dotnet/pull/2636)) - Added distributed tracing without performance for Azure Function Workers ([#2630](https://github.com/getsentry/sentry-dotnet/pull/2630)) - The SDK now provides and overload of `ContinueTrace` that accepts headers as `string` ([#2601](https://github.com/getsentry/sentry-dotnet/pull/2601)) - Sentry tracing middleware now gets configured automatically ([#2602](https://github.com/getsentry/sentry-dotnet/pull/2602)) @@ -181,7 +182,7 @@ API Changes: - Bump Cocoa SDK from v8.9.5 to v8.10.0 ([#2546](https://github.com/getsentry/sentry-dotnet/pull/2546), [#2550](https://github.com/getsentry/sentry-dotnet/pull/2550)) - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8100) - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.9.5...8.10.0) -- Bump gradle/gradle-build-action from 2.7.0 to 2.7.1 ([2564](https://github.com/getsentry/sentry-dotnet/pull/2564)) +- Bump gradle/gradle-build-action from 2.7.0 to 2.7.1 ([#2564](https://github.com/getsentry/sentry-dotnet/pull/2564)) - [diff](https://github.com/gradle/gradle-build-action/compare/v2.7.0...v2.7.1) ## 3.35.1 diff --git a/src/Sentry.Bindings.Native/Sentry.Bindings.Native.csproj b/src/Sentry.Bindings.Native/Sentry.Bindings.Native.csproj index 71a28b4ca5..aeaddbad05 100644 --- a/src/Sentry.Bindings.Native/Sentry.Bindings.Native.csproj +++ b/src/Sentry.Bindings.Native/Sentry.Bindings.Native.csproj @@ -35,9 +35,7 @@ - - - + true \runtimes\$(NativeLibRelativePath-win-x64) PreserveNewest @@ -71,7 +69,7 @@ BeforeTargets="DispatchToInnerBuilds;BeforeBuild" Condition="$([MSBuild]::IsOsPlatform('Windows'))" Inputs="..\..\.git\modules\modules\sentry-native\HEAD;$(MSBuildThisFileDirectory)Sentry.Bindings.Native.csproj" - Outputs="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib;$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).pdb"> + Outputs="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib"> @@ -87,13 +85,13 @@ -D SENTRY_BUILD_SHARED_LIBS=0 ^ -D SENTRY_BUILD_RUNTIMESTATIC=1 ^ -D SENTRY_BACKEND=none ^ - -D SENTRY_TRANSPORT=none " /> + -D SENTRY_TRANSPORT=none ^ + -C $(MSBuildThisFileDirectory)windows-config.cmake" /> - - - - - Always - %(FileName)%(Extension) - diff --git a/src/Sentry.Bindings.Native/windows-config.cmake b/src/Sentry.Bindings.Native/windows-config.cmake new file mode 100644 index 0000000000..cde2a2bdce --- /dev/null +++ b/src/Sentry.Bindings.Native/windows-config.cmake @@ -0,0 +1,3 @@ +# Include debug info in the static library itself. See https://github.com/getsentry/sentry-native/issues/895 for context. +set(CMAKE_C_FLAGS_RELWITHDEBINFO "/Z7 /O2 /Ob1 /DNDEBUG" CACHE STRING "C Flags for RelWithDebInfo" FORCE) +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Z7 /O2 /Ob1 /DNDEBUG" CACHE STRING "CXX Flags for RelWithDebInfo" FORCE) \ No newline at end of file diff --git a/src/Sentry/SentryValues.cs b/src/Sentry/SentryValues.cs index ef51f60e1c..b2193df876 100644 --- a/src/Sentry/SentryValues.cs +++ b/src/Sentry/SentryValues.cs @@ -6,8 +6,7 @@ namespace Sentry; /// /// Helps serialization of Sentry protocol types which include a values property. /// -// TODO: consider removing this as we control the serialization now -public sealed class SentryValues : IJsonSerializable +internal sealed class SentryValues : IJsonSerializable { /// /// The values. diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt index e6b4a09757..b2fed79c7f 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt @@ -835,12 +835,6 @@ namespace Sentry public override string ToString() { } public static Sentry.SentryTraceHeader Parse(string value) { } } - public sealed class SentryValues : Sentry.IJsonSerializable - { - public SentryValues(System.Collections.Generic.IEnumerable? values) { } - public System.Collections.Generic.IEnumerable Values { get; } - public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { } - } public class Session : Sentry.ISession { public Session(string? distinctId, string release, string? environment) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index 8328be075c..82d6efe403 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -836,12 +836,6 @@ namespace Sentry public override string ToString() { } public static Sentry.SentryTraceHeader Parse(string value) { } } - public sealed class SentryValues : Sentry.IJsonSerializable - { - public SentryValues(System.Collections.Generic.IEnumerable? values) { } - public System.Collections.Generic.IEnumerable Values { get; } - public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { } - } public class Session : Sentry.ISession { public Session(string? distinctId, string release, string? environment) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt index 8328be075c..82d6efe403 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt @@ -836,12 +836,6 @@ namespace Sentry public override string ToString() { } public static Sentry.SentryTraceHeader Parse(string value) { } } - public sealed class SentryValues : Sentry.IJsonSerializable - { - public SentryValues(System.Collections.Generic.IEnumerable? values) { } - public System.Collections.Generic.IEnumerable Values { get; } - public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { } - } public class Session : Sentry.ISession { public Session(string? distinctId, string release, string? environment) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 86f9c49598..b10ac3e381 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -834,12 +834,6 @@ namespace Sentry public override string ToString() { } public static Sentry.SentryTraceHeader Parse(string value) { } } - public sealed class SentryValues : Sentry.IJsonSerializable - { - public SentryValues(System.Collections.Generic.IEnumerable? values) { } - public System.Collections.Generic.IEnumerable Values { get; } - public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { } - } public class Session : Sentry.ISession { public Session(string? distinctId, string release, string? environment) { }