Skip to content

Commit

Permalink
Merge branch 'feat/4.0.0' into feat/sentry-native-macos
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind authored Nov 1, 2023
2 parents 654db02 + 835226b commit 86fcaf0
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 44 deletions.
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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<T>` is now internal as it is never exposed in the public API ([#2771](https://github.com/getsentry/sentry-dotnet/pull/2771))

## Unreleased

Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions src/Sentry.Bindings.Native/Sentry.Bindings.Native.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@

<!-- Packaging the native library -->
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or $([MSBuild]::IsOsPlatform('Windows'))">
<NativeLibs Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib" />
<NativeLibs Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).pdb" />
<None Include="@(NativeLibs)">
<None Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib">
<Pack>true</Pack>
<PackagePath>\runtimes\$(NativeLibRelativePath-win-x64)</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down Expand Up @@ -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">
<MSBuild Projects="$(MSBuildProjectFile)"
Targets="_InnerBuildSentryNativeSDK-win-x64"
Properties="TargetFramework=once" />
Expand All @@ -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" />
<Exec WorkingDirectory="$(SentryNativeSourceDirectory)"
Command="cmake --build build --target sentry --config RelWithDebInfo --parallel" />

<ItemGroup>
<NativeSdkArtifacts Include="$(SentryNativeSourceDirectory)build/RelWithDebInfo/sentry.lib" />
<NativeSdkArtifacts Include="$(SentryNativeSourceDirectory)build/RelWithDebInfo/sentry.pdb" />
</ItemGroup>

<Copy SourceFiles="@(NativeSdkArtifacts)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
<!-- Link statically -->
<NativeLibrary Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\sentry-native.lib" />
<NativeLibrary Include="dbghelp.lib" />

<!-- Copy debug symbols to the app output directory so that it can get uploaded by Sentry CLI. -->
<Content Include="$(MSBuildThisFileDirectory)..\runtimes\win-x64\native\sentry-native.pdb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Link>%(FileName)%(Extension)</Link>
</Content>
</ItemGroup>

<ItemGroup Condition="'$(OutputType)' == 'Exe' And '$(RuntimeIdentifier)' == 'linux-x64'">
Expand Down
3 changes: 3 additions & 0 deletions src/Sentry.Bindings.Native/windows-config.cmake
Original file line number Diff line number Diff line change
@@ -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)
3 changes: 1 addition & 2 deletions src/Sentry/SentryValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ namespace Sentry;
/// <summary>
/// Helps serialization of Sentry protocol types which include a values property.
/// </summary>
// TODO: consider removing this as we control the serialization now
public sealed class SentryValues<T> : IJsonSerializable
internal sealed class SentryValues<T> : IJsonSerializable
{
/// <summary>
/// The values.
Expand Down
6 changes: 0 additions & 6 deletions test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -835,12 +835,6 @@ namespace Sentry
public override string ToString() { }
public static Sentry.SentryTraceHeader Parse(string value) { }
}
public sealed class SentryValues<T> : Sentry.IJsonSerializable
{
public SentryValues(System.Collections.Generic.IEnumerable<T>? values) { }
public System.Collections.Generic.IEnumerable<T> 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) { }
Expand Down
6 changes: 0 additions & 6 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,6 @@ namespace Sentry
public override string ToString() { }
public static Sentry.SentryTraceHeader Parse(string value) { }
}
public sealed class SentryValues<T> : Sentry.IJsonSerializable
{
public SentryValues(System.Collections.Generic.IEnumerable<T>? values) { }
public System.Collections.Generic.IEnumerable<T> 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) { }
Expand Down
6 changes: 0 additions & 6 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,6 @@ namespace Sentry
public override string ToString() { }
public static Sentry.SentryTraceHeader Parse(string value) { }
}
public sealed class SentryValues<T> : Sentry.IJsonSerializable
{
public SentryValues(System.Collections.Generic.IEnumerable<T>? values) { }
public System.Collections.Generic.IEnumerable<T> 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) { }
Expand Down
6 changes: 0 additions & 6 deletions test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -834,12 +834,6 @@ namespace Sentry
public override string ToString() { }
public static Sentry.SentryTraceHeader Parse(string value) { }
}
public sealed class SentryValues<T> : Sentry.IJsonSerializable
{
public SentryValues(System.Collections.Generic.IEnumerable<T>? values) { }
public System.Collections.Generic.IEnumerable<T> 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) { }
Expand Down

0 comments on commit 86fcaf0

Please sign in to comment.