Releases: getsentry/sentry-dotnet
4.0.0-beta.2
Various fixes & improvements
Fixes
- Android native symbol upload (#2876)
- Sentry.Serilog no longer throws if a disabled DSN is provided when initializing Sentry via the Serilog integration (#2883)
.NET target frameworks changes
Dropped netstandard2.0 support for Sentry.AspNetCore (#2807)
API breaking Changes
Changed APIs
-
ISpanTracer has been renamed back again to ISpan, to make it easier to upgrade from v3.x to v4.x (#2870)
-
release: 3.41.1 (b40818b) by @getsentry-bot
-
chore(deps): update Cocoa SDK to v8.16.0 (#2882) by @github-actions
-
Add SentryOptions.AutoRegisterTracing (#2871) by @jamescrosswell
-
chore: update scripts/update-java.ps1 to 6.34.0 (#2874) by @github-actions
3.41.2
3.41.1
Fixes
CaptureFailedRequests
andFailedRequestStatusCodes
are now getting respected by the Cocoa SDK. This is relevant for MAUI apps where requests are getting handled natively. (#2826)- Added
SentryOptions.AutoRegisterTracing
for users who need to control registration of Sentry's tracing middleware (#2871)
Dependencies
4.0.0-beta.1
Features
Sentry.Profiling
is now packaged to be uploaded to nuget.org (#2800)
4.0.0-beta.0
Fixes
- Don't add WinUI exception integration on mobile platforms (#2821)
Transactions
are now getting enriched by the client instead of the hub (#2838)
API breaking Changes
Removed APIs
- A number of
[Obsolete]
options have been removed (#2841)BeforeSend
- useSetBeforeSend
instead.BeforeSendTransaction
- useSetBeforeSendTransaction
instead.BeforeBreadcrumb
- useSetBeforeBreadcrumb
instead.CreateHttpClientHandler
- useCreateHttpMessageHandler
instead.ReportAssemblies
- useReportAssembliesMode
instead.KeepAggregateException
- this property is no longer used and has no replacement.DisableTaskUnobservedTaskExceptionCapture
method has been renamed toDisableUnobservedTaskExceptionCapture
.DebugDiagnosticLogger
- useTraceDiagnosticLogger
instead.
- A number of iOS/Android-specific
[Obsolete]
options have been removed (#2856)Distribution
- useSentryOptions.Distribution
instead.EnableAutoPerformanceTracking
- useSetBeforeSendTransaction
instead.EnableCoreDataTracking
- useEnableCoreDataTracing
instead.EnableFileIOTracking
- useEnableFileIOTracing
instead.EnableOutOfMemoryTracking
- useEnableWatchdogTerminationTracking
instead.EnableUIViewControllerTracking
- useEnableUIViewControllerTracing
instead.StitchAsyncCode
- no longer available.ProfilingTracesInterval
- no longer available.ProfilingEnabled
- useProfilesSampleRate
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)
Changed APIs
4.0.0-alpha.0
Breaking changes
The minimum version supported for different frameworks changed.
For more details on reasoning, please check this GitHub Discussion.
.NET Framework 4.6.1
.NET Framework 4.6.1 was announced in Nov 30, 2015. And went out of support over a year ago, on Apr 26, 2022.
- Drop support for .NET Framework 4.6.1 in favor of 4.6.2 (#2786)
.NET 6 on mobile (e.g: net6.0-android
)
.NET 6 on mobile is out of support since May 2023. With .NET 8 coming,
it won't be possible to build .NET 6 Mobile specific targets.
For that reason, we're moving the mobile specific TFMs from net6.0-platform
to net7.0-platform
.
Mobile apps still on .NET 6 will pull the Sentry
.NET 6, which offers the .NET-only features,
without native/platform specific bindings and SDKs. See this ticket for more details.
- Drop .NET 6 Mobile in favor of .NET 7 (#2624)
Tizen support dropped
- Drop support for
Tizen
(#2734)
Dropping .NET Core 3.1 and .NET 5
- Drop .NET Core 3.1 and .NET 5 support (#2787)
API Changes:
-
IHasMeasurements was removed. Use ISpanData instead. (#2659)
-
If
null
has been supplied as DSN when initializing Sentry, and ArgumentNullException is now thrown. (#2655) -
IHasBreadcrumbs was removed. Use IEventLike instead. (#2670)
-
ISpanContext was removed. Use ITraceContext instead. (#2668)
-
Removed IHasTransactionNameSource. Use ITransactionContext instead. (#2654)
-
Adding
Distribution
toIEventLike
. (#2660) -
Upgraded to NLog version 5. (#2697)
-
Removed unused
StackFrame.InstructionOffset
. (#2691) -
Change
StackFrame
'sImageAddress
,InstructionAddress
andFunctionId
tolong?
. (#2691) -
Change
DebugImage.ImageAddress
tolong?
. (#2725) -
Enable
CaptureFailedRequests
by default (#2688) -
Additional constructors removed from
TransactionTracer
. (#2694) -
Removed the
Scope.Platform
property as it was never applied. (#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)
-
The
DiagnosticLogger
signature forLogError
andLogFatal
changed to take theexception
as the first parameter. That way it does no longer get mixed up with the TArgs. TheDiagnosticLogger
now also received an overload forLogError
andLogFatal
that accepts a message only. (#2715) -
Integrate
sentry-native
as a static library in Native AOT builds to enable symbolication. (#2704) -
Contexts now inherits from
IDictionary
rather thanConcurrentDictionary
. The specific dictionary being used is an implementation detail. (#2729) -
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) -
The methods
WithScope
andWithScopeAsync
have been removed. We discovered that these methods didn't work correctly in certain desktop contexts, especially when using a global scope. (#2717)
Replace your usage ofWithScope
with the overloads of theCapture
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 => { // Configure your scope here scope.SetTag("key", "value"); SentrySdk.CaptureEvent(new SentryEvent()); // Capture the event with the configured scope });
After
SentrySdk.CaptureEvent(new SentryEvent(), scope => { // Configure your scope here scope.SetTag("key", "value"); });
-
ISpan
andITransaction
have been renamed toISpanTracer
andITransactionTracer
. You will need to update any references to these interfaces in your code to use the new interface names (#2731) -
Removed obsolete setter from
Sentry.PlatformAbstractions.Runtime.Identifier
(2764) -
Sentry.Values<T>
is now internal as it is never exposed in the public API (#2771) -
AOT compilation support for .NET 7+ has been added to Sentry, Sentry.Serilog, Sentry.Profiling, Sentry.OpenTelemetry and Sentry.NLog. There are some functional differences when compiling AOT:
- Enhanced Stack Traces are not available when compiling AOT, as the mechanism to generate these ehanced stack traces currently relies heavily on reflection and isn't compatible with trimming.
- Reflection cannot be leveraged for JSON Serialization and you may need to supply a
JsonSerializationContext
for types that you'd like to send to Sentry (e.g. in the Span.Context). You can useSentryOptions.AddJsonSerializerContext
to supply your own context when initializing Sentry. - When compiling AOT, Sentry isn't able to automatically register an unhandled exception handler in WinUI applications, since that also relies on reflection. If you're using Sentry with a WinUI application and you want to use AOT compilation, you'll need to take care of registering the unhandled event handler yourself. TODO *** Fill in the gaps here when #2778 has been completed ***
- (#2732), (#2793)
-
The TracePropagationTarget class has been removed. Use the SubstringOrRegexPattern class instead. (#2763)
-
Transaction names for ASP.NET Core are now consistently named
HTTP-VERB /path
(e.g.GET /home
). Previously the leading forward slash might not have been present for some endpoints (#2808)
Sentry.Google.Cloud.Functions
- Min version of
Google.Cloud.Functions.Hosting
supported 1.1.0 to 2.0.0 (#2787)
3.41.0
3.40.1
3.40.0
Obsoletion
WithScope
andWithScopeAsync
have been proven to not work correctly in desktop contexts when using a global scope. They are now deprecated in favor of the overloads ofCaptureEvent
,CaptureMessage
, andCaptureException
. Those methods provide a callback to a configurable scope. (#2677)StackFrame.InstructionOffset
has not been used in the SDK and has been ignored on the server for years. (#2689)
Features
- Release of Azure Functions (Isolated Worker/Out-of-Process) support (#2686)
Fixes
- Scope is now correctly applied to Transactions when using OpenTelemetry on ASP.NET Core (#2690)
Dependencies
3.40.0-beta.0
Features
- Reduced the memory footprint of
SpanId
by refactoring the ID generation (2619) - Reduced the memory footprint of
SpanTracer
by initializing the tags lazily (2636) - Added distributed tracing without performance for Azure Function Workers (#2630)
- The SDK now provides and overload of
ContinueTrace
that accepts headers asstring
(#2601) - Sentry tracing middleware now gets configured automatically (#2602)
Fixes
- Resolved issue identifying users with OpenTelemetry (#2618)
Azure Functions Beta
- Package name changed from
Sentry.AzureFunctions.Worker
toSentry.Azure.Functions.Worker
. Note AzureFunctions now is split by a.
. (#2637)