2.0.0
This major release is based on the .NET 4.0 release and includes features like Metrics(preview) and Spotlight.
Significant change in behavior
- Transactions' spans are no longer automatically finished with the status
deadline_exceeded
by the transaction. This is now handled by the Relay.- Customers self hosting Sentry must use verion 22.12.0 or later (#3013)
- The
User.IpAddress
is now set to{{auto}}
by default, even when sendDefaultPII is disabled (#2981)- The "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io can be used to control this instead
- The
DiagnosticLogger
signature forLogWarning
changed to take theexception
as the first parameter. That way it no longer gets mixed up with the TArgs. (#2987)
API breaking Changes
If you have compilation errors you can find the affected types or overloads missing in the changelog entries below.
Changed APIs
- Class renamed from
Sentry.Attachment
toSentry.SentryAttachment
(#3116) - Class renamed from
Sentry.Constants
toSentry.SentryConstants
(#3125) - Class renamed from
Sentry.Context
toSentry.SentryContext
(#3121) - Class renamed from
Sentry.Hint
toSentry.SentryHint
(#3116) - Class renamed from
Sentry.Package
toSentry.SentryPackage
(#3121) - Class renamed from
Sentry.Request
toSentry.SentryRequest
(#3121) - Class renamed from
Sentry.Runtime
toSentry.SentryRuntime
(#3016) - Class renamed from
Sentry.Session
toSentry.SentrySession
(#3110) - Class renamed from
Sentry.Span
toSentry.SentrySpan
(#3021) - Class renamed from
Sentry.Transaction
toSentry.SentryTransaction
(#3023) - Class renamed from
Sentry.User
toSentry.SentryUser
(#3015) - Interface renamed from
Sentry.IJsonSerializable
toSentry.ISentryJsonSerializable
(#3116) - Interface renamed from
Sentry.ISession
toSentry.ISentrySession
(#3110) SentryClient.Dispose
is no longer obsolete (#2842)ISentryClient.CaptureEvent
overloads have been replaced by a single method accepting optionalHint
andScope
parameters. You will need to passhint
as a named parameter from code that callsCaptureEvent
without passing ascope
argument. (#2749)ITransaction
has been renamed toITransactionTracer
. You will need to update any references to these interfaces in your code to use the new interface names (#2731, #2870)TransactionContext
andSpanContext
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, #2696)- The
DiagnosticLogger
signature forLogError
andLogFatal
changed to take theexception
as the first parameter. That way it no longer gets mixed up with the TArgs. TheDiagnosticLogger
now also receives an overload forLogError
andLogFatal
that accepts a message only. (#2715) Distribution
added toIEventLike
. (#2660)StackFrame
'sImageAddress
,InstructionAddress
, andFunctionId
changed tolong?
. (#2691)DebugImage
andDebugMeta
moved toSentry.Protocol
namespace. (#2815)DebugImage.ImageAddress
changed tolong?
. (#2725)- Contexts now inherit from
IDictionary
rather thanConcurrentDictionary
. The specific dictionary being used is an implementation detail. (#2729)
Removed APIs
-
SentrySinkExtensions.ConfigureSentrySerilogOptions is now internal. If you were using this method, please use one of the
SentrySinkExtensions.Sentry
extension methods instead. (#2902) -
A number of
[Obsolete]
options have been removed (#2841)BeforeSend
- useSetBeforeSend
instead.BeforeSendTransaction
- useSetBeforeSendTransaction
instead.BeforeBreadcrumb
- useSetBeforeBreadcrumb
instead.CreateHttpClientHandler
- useCreateHttpMessageHandler
instead.DisableTaskUnobservedTaskExceptionCapture
method has been renamed toDisableUnobservedTaskExceptionCapture
.DebugDiagnosticLogger
- useTraceDiagnosticLogger
instead.KeepAggregateException
- this property is no longer used and has no replacement.ReportAssemblies
- useReportAssembliesMode
instead.
-
Obsolete
SystemClock
constructor removed, useSystemClock.Clock
instead. (#2856) -
Obsolete
Runtime.Clone()
removed, this shouldn't have been public in the past and has no replacement. (#2856) -
Obsolete
SentryException.Data
removed, useSentryException.Mechanism.Data
instead. (#2856) -
Obsolete
AssemblyExtensions
removed, this shouldn't have been public in the past and has no replacement. (#2856) -
Obsolete
SentryDatabaseLogging.UseBreadcrumbs()
removed, it is called automatically and has no replacement. (#2856) -
Obsolete
Scope.GetSpan()
removed, useSpan
property instead. (#2856) -
Obsolete
IUserFactory
removed, useISentryUserFactory
instead. (#2856, #2840) -
IHasMeasurements
has been removed, useISpanData
instead. (#2659) -
IHasBreadcrumbs
has been removed, useIEventLike
instead. (#2670) -
ISpanContext
has been removed, useITraceContext
instead. (#2668) -
IHasTransactionNameSource
has been removed, useITransactionContext
instead. (#2654) -
(#2694)
-
The unused
StackFrame.InstructionOffset
has been removed. (#2691) -
The unused
Scope.Platform
property has been removed. (#2695) -
The obsolete setter
Sentry.PlatformAbstractions.Runtime.Identifier
has been removed (2764) -
Sentry.Values<T>
is now internal as it is never exposed in the public API (#2771) -
The
TracePropagationTarget
class has been removed, use theSubstringOrRegexPattern
class instead. (#2763) -
The
WithScope
andWithScopeAsync
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)
Replace your usage ofWithScope
with overloads ofCapture*
methods:SentrySdk.CaptureEvent(SentryEvent @event, Action<Scope> scopeCallback)
SentrySdk.CaptureMessage(string message, Action<Scope> scopeCallback)
SentrySdk.CaptureException(Exception exception, Action<Scope> scopeCallback)
// Before SentrySdk.WithScope(scope => { scope.SetTag("key", "value"); SentrySdk.CaptureEvent(new SentryEvent()); }); // After SentrySdk.CaptureEvent(new SentryEvent(), scope => { // Configure your scope here scope.SetTag("key", "value"); });
Features
- 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)
- Support for Spotlight, a debug tool for local development. (#2961)
- Enable it with the option
EnableSpotlight
- Optionally configure the URL to connect via
SpotlightUrl
. Defaults tohttp://localhost:8969/stream
.
- Enable it with the option
Dependencies
- Bump .NET SDK from v3.41.3 to v4.0.0 #1505
- Bump CLI from v2.24.1 to v2.28.6 (#1534, #1539, #1540, #1542, #1547, #1560, #1562)
- Bump Native SDK from v0.6.7 to v0.7.0 (#1535)
- Bump Java SDK from v7.1.0 to v7.3.0 (#1538, #1548)
- Bump .NET SDK from v3.41.3 to v3.41.4 (#1544)
- Bump Cocoa SDK from v8.18.0 to v8.20.0 (#1545, #1549)