|
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | 4 |
|
| 5 | +This major release is based on the .NET 4.0 release and includes features like [Metrics](https://docs.sentry.io/platforms/dotnet/metrics/)(preview) and [Spotlight](https://spotlightjs.com/). |
| 6 | + |
| 7 | +### Significant change in behavior |
| 8 | + |
| 9 | +- Transactions' spans are no longer automatically finished with the status `deadline_exceeded` by the transaction. This is now handled by the [Relay](https://github.com/getsentry/relay). |
| 10 | + - Customers self hosting Sentry must use verion 22.12.0 or later ([#3013](https://github.com/getsentry/sentry-dotnet/pull/3013)) |
| 11 | +- The `User.IpAddress` is now set to `{{auto}}` by default, even when sendDefaultPII is disabled ([#2981](https://github.com/getsentry/sentry-dotnet/pull/2981)) |
| 12 | + - The "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io can be used to control this instead |
| 13 | +- The `DiagnosticLogger` signature for `LogWarning` changed to take the `exception` as the first parameter. That way it no longer gets mixed up with the TArgs. ([#2987](https://github.com/getsentry/sentry-dotnet/pull/2987)) |
| 14 | + |
| 15 | +### API breaking Changes |
| 16 | + |
| 17 | +If you have compilation errors you can find the affected types or overloads missing in the changelog entries below. |
| 18 | + |
| 19 | +#### Changed APIs |
| 20 | + |
| 21 | +- Class renamed from `Sentry.Attachment` to `Sentry.SentryAttachment` ([#3116](https://github.com/getsentry/sentry-dotnet/pull/3116)) |
| 22 | +- Class renamed from `Sentry.Constants` to `Sentry.SentryConstants` ([#3125](https://github.com/getsentry/sentry-dotnet/pull/3125)) |
| 23 | +- Class renamed from `Sentry.Context` to `Sentry.SentryContext` ([#3121](https://github.com/getsentry/sentry-dotnet/pull/3121)) |
| 24 | +- Class renamed from `Sentry.Hint` to `Sentry.SentryHint` ([#3116](https://github.com/getsentry/sentry-dotnet/pull/3116)) |
| 25 | +- Class renamed from `Sentry.Package` to `Sentry.SentryPackage` ([#3121](https://github.com/getsentry/sentry-dotnet/pull/3121)) |
| 26 | +- Class renamed from `Sentry.Request` to `Sentry.SentryRequest` ([#3121](https://github.com/getsentry/sentry-dotnet/pull/3121)) |
| 27 | +- Class renamed from `Sentry.Runtime` to `Sentry.SentryRuntime` ([#3016](https://github.com/getsentry/sentry-dotnet/pull/3016)) |
| 28 | +- Class renamed from `Sentry.Session` to `Sentry.SentrySession` ([#3110](https://github.com/getsentry/sentry-dotnet/pull/3110)) |
| 29 | +- Class renamed from `Sentry.Span` to `Sentry.SentrySpan` ([#3021](https://github.com/getsentry/sentry-dotnet/pull/3021)) |
| 30 | +- Class renamed from `Sentry.Transaction` to `Sentry.SentryTransaction` ([#3023](https://github.com/getsentry/sentry-dotnet/pull/3023)) |
| 31 | +- Class renamed from `Sentry.User` to `Sentry.SentryUser` ([#3015](https://github.com/getsentry/sentry-dotnet/pull/3015)) |
| 32 | +- Interface renamed from `Sentry.IJsonSerializable` to `Sentry.ISentryJsonSerializable` ([#3116](https://github.com/getsentry/sentry-dotnet/pull/3116)) |
| 33 | +- Interface renamed from `Sentry.ISession` to `Sentry.ISentrySession` ([#3110](https://github.com/getsentry/sentry-dotnet/pull/3110)) |
| 34 | +- `SentryClient.Dispose` is no longer obsolete ([#2842](https://github.com/getsentry/sentry-dotnet/pull/2842)) |
| 35 | +- `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)) |
| 36 | +- `ITransaction` has been renamed to `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), [#2870](https://github.com/getsentry/sentry-dotnet/pull/2870)) |
| 37 | +- `TransactionContext` and `SpanContext` constructors were updated. If you're constructing instances of these classes, you will need to adjust the order in which you pass parameters to these. ([#2694](https://github.com/getsentry/sentry-dotnet/pull/2694), [#2696](https://github.com/getsentry/sentry-dotnet/pull/2696)) |
| 38 | +- The `DiagnosticLogger` signature for `LogError` and `LogFatal` changed to take the `exception` as the first parameter. That way it no longer gets mixed up with the TArgs. The `DiagnosticLogger` now also receives an overload for `LogError` and `LogFatal` that accepts a message only. ([#2715](https://github.com/getsentry/sentry-dotnet/pull/2715)) |
| 39 | +- `Distribution` added to `IEventLike`. ([#2660](https://github.com/getsentry/sentry-dotnet/pull/2660)) |
| 40 | +- `StackFrame`'s `ImageAddress`, `InstructionAddress`, and `FunctionId` changed to `long?`. ([#2691](https://github.com/getsentry/sentry-dotnet/pull/2691)) |
| 41 | +- `DebugImage` and `DebugMeta` moved to `Sentry.Protocol` namespace. ([#2815](https://github.com/getsentry/sentry-dotnet/pull/2815)) |
| 42 | +- `DebugImage.ImageAddress` changed to `long?`. ([#2725](https://github.com/getsentry/sentry-dotnet/pull/2725)) |
| 43 | +- Contexts now inherit from `IDictionary` rather than `ConcurrentDictionary`. The specific dictionary being used is an implementation detail. ([#2729](https://github.com/getsentry/sentry-dotnet/pull/2729)) |
| 44 | + |
| 45 | +#### Removed APIs |
| 46 | + |
| 47 | +- SentrySinkExtensions.ConfigureSentrySerilogOptions is now internal. If you were using this method, please use one of the `SentrySinkExtensions.Sentry` extension methods instead. ([#2902](https://github.com/getsentry/sentry-dotnet/pull/2902)) |
| 48 | +- A number of `[Obsolete]` options have been removed ([#2841](https://github.com/getsentry/sentry-dotnet/pull/2841)) |
| 49 | + - `BeforeSend` - use `SetBeforeSend` instead. |
| 50 | + - `BeforeSendTransaction` - use `SetBeforeSendTransaction` instead. |
| 51 | + - `BeforeBreadcrumb` - use `SetBeforeBreadcrumb` instead. |
| 52 | + - `CreateHttpClientHandler` - use `CreateHttpMessageHandler` instead. |
| 53 | + - `DisableTaskUnobservedTaskExceptionCapture` method has been renamed to `DisableUnobservedTaskExceptionCapture`. |
| 54 | + - `DebugDiagnosticLogger` - use `TraceDiagnosticLogger` instead. |
| 55 | + - `KeepAggregateException` - this property is no longer used and has no replacement. |
| 56 | + - `ReportAssemblies` - use `ReportAssembliesMode` instead. |
| 57 | +- Obsolete `SystemClock` constructor removed, use `SystemClock.Clock` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 58 | +- Obsolete `Runtime.Clone()` removed, this shouldn't have been public in the past and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 59 | +- Obsolete `SentryException.Data` removed, use `SentryException.Mechanism.Data` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 60 | +- Obsolete `AssemblyExtensions` removed, this shouldn't have been public in the past and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 61 | +- Obsolete `SentryDatabaseLogging.UseBreadcrumbs()` removed, it is called automatically and has no replacement. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 62 | +- Obsolete `Scope.GetSpan()` removed, use `Span` property instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856)) |
| 63 | +- Obsolete `IUserFactory` removed, use `ISentryUserFactory` instead. ([#2856](https://github.com/getsentry/sentry-dotnet/pull/2856), [#2840](https://github.com/getsentry/sentry-dotnet/pull/2840)) |
| 64 | +- `IHasMeasurements` has been removed, use `ISpanData` instead. ([#2659](https://github.com/getsentry/sentry-dotnet/pull/2659)) |
| 65 | +- `IHasBreadcrumbs` has been removed, use `IEventLike` instead. ([#2670](https://github.com/getsentry/sentry-dotnet/pull/2670)) |
| 66 | +- `ISpanContext` has been removed, use `ITraceContext` instead. ([#2668](https://github.com/getsentry/sentry-dotnet/pull/2668)) |
| 67 | +- `IHasTransactionNameSource` has been removed, use `ITransactionContext` instead. ([#2654](https://github.com/getsentry/sentry-dotnet/pull/2654)) |
| 68 | +- ([#2694](https://github.com/getsentry/sentry-dotnet/pull/2694)) |
| 69 | +- The unused `StackFrame.InstructionOffset` has been removed. ([#2691](https://github.com/getsentry/sentry-dotnet/pull/2691)) |
| 70 | +- The unused `Scope.Platform` property has been removed. ([#2695](https://github.com/getsentry/sentry-dotnet/pull/2695)) |
| 71 | +- The obsolete setter `Sentry.PlatformAbstractions.Runtime.Identifier` has been removed ([2764](https://github.com/getsentry/sentry-dotnet/pull/2764)) |
| 72 | +- `Sentry.Values<T>` is now internal as it is never exposed in the public API ([#2771](https://github.com/getsentry/sentry-dotnet/pull/2771)) |
| 73 | +- The `TracePropagationTarget` class has been removed, use the `SubstringOrRegexPattern` class instead. ([#2763](https://github.com/getsentry/sentry-dotnet/pull/2763)) |
| 74 | +- The `WithScope` and `WithScopeAsync` methods have been removed. We have 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)) |
| 75 | + Replace your usage of `WithScope` with overloads of `Capture*` methods: |
| 76 | + |
| 77 | + - `SentrySdk.CaptureEvent(SentryEvent @event, Action<Scope> scopeCallback)` |
| 78 | + - `SentrySdk.CaptureMessage(string message, Action<Scope> scopeCallback)` |
| 79 | + - `SentrySdk.CaptureException(Exception exception, Action<Scope> scopeCallback)` |
| 80 | + |
| 81 | + ```c# |
| 82 | + // Before |
| 83 | + SentrySdk.WithScope(scope => |
| 84 | + { |
| 85 | + scope.SetTag("key", "value"); |
| 86 | + SentrySdk.CaptureEvent(new SentryEvent()); |
| 87 | + }); |
| 88 | + |
| 89 | + // After |
| 90 | + SentrySdk.CaptureEvent(new SentryEvent(), scope => |
| 91 | + { |
| 92 | + // Configure your scope here |
| 93 | + scope.SetTag("key", "value"); |
| 94 | + }); |
| 95 | + ``` |
| 96 | + |
| 97 | +### Features |
| 98 | + |
| 99 | +- Experimental pre-release availability of Metrics. We're exploring the use of Metrics in Sentry. The API will very likely change and we don't yet have any documentation. ([#2949](https://github.com/getsentry/sentry-dotnet/pull/2949)) |
| 100 | + - `SentrySdk.Metrics.Set` now additionally accepts `string` as value ([#3092](https://github.com/getsentry/sentry-dotnet/pull/3092)) |
| 101 | + - Timing metrics can now be captured with `SentrySdk.Metrics.StartTimer` ([#3075](https://github.com/getsentry/sentry-dotnet/pull/3075)) |
| 102 | +- Support for [Spotlight](https://spotlightjs.com/), a debug tool for local development. ([#2961](https://github.com/getsentry/sentry-dotnet/pull/2961)) |
| 103 | + - Enable it with the option `EnableSpotlight` |
| 104 | + - Optionally configure the URL to connect via `SpotlightUrl`. Defaults to `http://localhost:8969/stream`. |
| 105 | + |
5 | 106 | ### Dependencies |
6 | 107 |
|
| 108 | +- Bump .NET SDK from v3.41.3 to v4.0.0 [#1505](https://github.com/getsentry/sentry-unity/pull/1488) |
| 109 | + - [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#400) |
| 110 | + - [diff](https://github.com/getsentry/sentry-dotnet/compare/3.41.3...4.0.0) |
7 | 111 | - Bump CLI from v2.24.1 to v2.28.6 ([#1534](https://github.com/getsentry/sentry-unity/pull/1534), [#1539](https://github.com/getsentry/sentry-unity/pull/1539), [#1540](https://github.com/getsentry/sentry-unity/pull/1540), [#1542](https://github.com/getsentry/sentry-unity/pull/1542), [#1547](https://github.com/getsentry/sentry-unity/pull/1547), [#1560](https://github.com/getsentry/sentry-unity/pull/1560), [#1562](https://github.com/getsentry/sentry-unity/pull/1562)) |
8 | 112 | - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2286) |
9 | 113 | - [diff](https://github.com/getsentry/sentry-cli/compare/2.24.1...2.28.6) |
|
0 commit comments