Skip to content

Releases: getsentry/sentry-dotnet

4.1.0

09 Feb 23:50
Compare
Choose a tag to compare

Features

  • The SDK now automatically collects metrics coming from OpenTelemetry.Instrumentation.Runtime (#3133)

Fixes

  • "No service for type 'Sentry.IHub' has been registered" exception when using OpenTelemetry and initializing Sentry via SentrySdk.Init (#3129)

4.0.3

07 Feb 18:32
Compare
Choose a tag to compare

Fixes

  • To resolve conflicting types due to the SDK adding itself to the global usings:
    • The class Sentry.Constants has been renamed to Sentry.SentryConstants (#3125)

4.0.2

06 Feb 23:01
Compare
Choose a tag to compare

Fixes

  • To resolve conflicting types due to the SDK adding itself to the global usings:
  • The class Sentry.Context has been renamed to Sentry.SentryContext (#3121)
  • The class Sentry.Package has been renamed to Sentry.SentryPackage (#3121)
  • The class Sentry.Request has been renamed to Sentry.SentryRequest (#3121)

Dependencies

4.0.1

05 Feb 23:02
Compare
Choose a tag to compare

Fixes

  • To resolve conflicting types due to the SDK adding itself to the global usings:
  • The interface Sentry.ISession has been renamed to Sentry.ISentrySession (#3110)
  • The interface Sentry.IJsonSerializable has been renamed to Sentry.ISentryJsonSerializable (#3116)
  • The class Sentry.Session has been renamed to Sentry.SentrySession (#3110)
  • The class Sentry.Attachment has been renamed to Sentry.SentryAttachment (#3116)
  • The class Sentry.Hint has been renamed to Sentry.SentryHint (#3116)

Dependencies

4.0.0

01 Feb 10:40
Compare
Choose a tag to compare

This major release includes many exciting new features including support for Profiling and Metrics(preview), AOT with Native Crash Reporting, Spotlight, Screenshots on MAUI and much more. Details about these features and other changes are below.

.NET target framework changes

We're dropping support for some of the old target frameworks, please check this GitHub Discussion for details on why.

  • Replace support for .NET Framework 4.6.1 with 4.6.2 (#2786)

    .NET Framework 4.6.1 was announced on Nov 30, 2015. And went out of support over a year ago, on Apr 26, 2022.

  • Drop .NET Core 3.1 and .NET 5 support (#2787)

  • Dropped netstandard2.0 support for Sentry.AspNetCore (#2807)

  • Replace support for .NET 6 on mobile (e.g: net6.0-android) with .NET 7 (#2624)

    .NET 6 on mobile has been out of support since May 2023 and with .NET 8, it's no longer 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 work 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.

  • MAUI dropped Tizen support (#2734)

Sentry Self-hosted Compatibility

If you're using sentry.io this change does not affect you.
This SDK version is compatible with a self-hosted version of Sentry 22.12.0 or higher. If you are using an older version of self-hosted Sentry (aka on-premise), you will need to upgrade.

Significant change in behavior

  • Transaction names for ASP.NET Core are now consistently named HTTP-VERB /path (e.g. GET /home). Previously, the leading forward slash was missing for some endpoints. (#2808)
  • Setting SentryOptions.Dsn to null now throws ArgumentNullException during initialization. (#2655)
  • Enable CaptureFailedRequests by default (#2688)
  • Added Sentry namespace to global usings when ImplicitUsings is enabled (#3043)
    If you have conflicts, you can opt out by adding the following to your csproj:
<PropertyGroup>
  <SentryImplicitUsings>false</SentryImplicitUsings>
</PropertyGroup>
  • 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 for LogWarning changed to take the exception 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 Sentry.User to Sentry.SentryUser (#3015)
  • Class renamed Sentry.Runtime to Sentry.SentryRuntime (#3016)
  • Class renamed Sentry.Span to Sentry.SentrySpan (#3021)
  • Class renamed Sentry.Transaction to Sentry.SentryTransaction (#3023)
  • Rename iOS and MacCatalyst platform-specific options from Cocoa to Native (#2940)
  • Rename iOS platform-specific options EnableCocoaSdkTracing to EnableTracing (#2940)
  • Rename Android platform-specific options from Android to Native (#2940)
  • Rename Android platform-specific options EnableAndroidSdkTracing and EnableAndroidSdkBeforeSend to EnableTracing and EnableBeforeSend respectively (#2940)
  • Rename iOS and MacCatalyst platform-specific options from iOS to Cocoa (#2929)
  • 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, #2870)
  • DebugImage and DebugMeta moved to Sentry.Protocol namespace. (#2815)
  • SentryClient.Dispose is no longer obsolete (#2842)
  • 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)
  • 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, #2696)
  • 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)
  • Distribution added to IEventLike. (#2660)
  • StackFrame's ImageAddress, InstructionAddress, and FunctionId changed to long?. (#2691)
  • DebugImage.ImageAddress changed to long?. (#2725)
  • Contexts now inherit from IDictionary rather than ConcurrentDictionary. The specific dictionary being used is an implementation detail. (#2729)
  • The method used to configure a Sentry Sink for Serilog now has an additional overload. Calling WriteTo.Sentry() with no arguments will no longer attempt to initialize the SDK (it has optional arguments to configure the behavior of the Sink only). If you want to initialize Sentry at the same time you configure the Sentry Sink then you will need to use the overload of this method that accepts a DSN as the first parameter (e.g. WriteTo.Sentry("https://d4d82fc1c2c4032a83f3a29aa3a3aff@fake-sentry.io:65535/2147483647")). (#2928)

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 - use SetBeforeSend instead.
    • BeforeSendTransaction - use SetBeforeSendTransaction instead.
    • BeforeBreadcrumb - use SetBeforeBreadcrumb instead.
    • CreateHttpClientHandler - use CreateHttpMessageHandler instead.
    • ReportAssemblies - use ReportAssembliesMode instead.
    • KeepAggregateException - this property is no longer used and has no replacement.
    • DisableTaskUnobservedTaskExceptionCapture method has been renamed to DisableUnobservedTaskExceptionCapture.
    • DebugDiagnosticLogger - use TraceDiagnosticLogger instead.
  • A number of iOS/Android-specific [Obsolete] options have been removed (#2856)
    • Distribution - use SentryOptions.Distribution instead.
    • EnableAutoPerformanceTracking - use SetBeforeSendTransaction instead.
    • EnableCoreDataTracking - use EnableCoreDataTracing instead.
    • EnableFileIOTracking - use EnableFileIOTracing instead.
    • EnableOutOfMemoryTracking - use EnableWatchdogTerminationTracking instead.
    • EnableUIViewControllerTracking - use EnableUIViewControllerTracing instead.
    • StitchAsyncCode - no longer available.
    • ProfilingTracesInterval - no longer available.
    • ProfilingEnabled - use ProfilesSampleRate instead.
  • Obsolete SystemClock constructor removed, use SystemClock.Clock instead. (#2856)
  • Obsolete `Runtime.Clone...
Read more

4.0.0-beta.9

30 Jan 17:23
Compare
Choose a tag to compare
4.0.0-beta.9 Pre-release
Pre-release

Features

  • Added support for capturing built in metrics from the System.Diagnostics.Metrics API (#3052)

Significant change in behavior

  • Added Sentry namespace to global usings when ImplicitUsings is enabled (#3043)
    If you have conflicts, you can opt-out by adding the following to your csproj:
<PropertyGroup>
  <SentryImplicitUsings>false</SentryImplicitUsings>
</PropertyGroup>

Features

  • SentrySdk.Metrics.Set now additionally accepts string as value (#3092)
  • Timing metrics can now be captured with SentrySdk.Metrics.StartTimer (#3075)

Fixes

  • Fixed an issue with tag values in metrics not being properly serialized (#3065)
  • Moved the binding to MAUI events for breadcrumb creation from WillFinishLaunching to FinishedLaunching. This delays the initial instantiation of app. (#3057)
  • The SDK no longer adds the WinUIUnhandledExceptionIntegration on non Windows platforms (#3055)
  • The scope transaction is now correctly set for Otel transactions (#3072)
  • Native integration logging on macOS (#3079)
  • Native linking of cURL library when targeting platform-specific TFMs (e.g. net8.0-macos) (#3080)

Dependencies

3.41.4

23 Jan 14:17
Compare
Choose a tag to compare

Fixes

  • Fixed an issue when using the SDK together with Open Telemetry 1.5.0 and newer where the SDK would create transactions for itself. The fix is backwards compatible. (#3001)

4.0.0-beta.8

11 Jan 18:37
Compare
Choose a tag to compare
4.0.0-beta.8 Pre-release
Pre-release

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)

Significant change in behavior

  • Transactions' spans are no longer automatically finished with 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)

API breaking Changes

Changed APIs

  • Class renamed Sentry.User to Sentry.SentryUser (#3015)
  • Class renamed Sentry.Runtime to Sentry.SentryRuntime (#3016)
  • Class renamed Sentry.Span to Sentry.SentrySpan (#3021)
  • Class renamed Sentry.Transaction to Sentry.SentryTransaction (#3023)

Dependencies

4.0.0-beta.7

05 Jan 15:39
Compare
Choose a tag to compare
4.0.0-beta.7 Pre-release
Pre-release

Features

  • MAUI Screenshot support. You can opt-in via SentryMauiOptions.AttachScreenshots (#2965)
    • Supports Android and iOS only. Windows is not supported.
  • MAUI: App context has in_foreground indicating whether app was on the background or foreground. (#2983)

Fixes

  • Fixed an issue when using the SDK together with Open Telemetry 1.5.0 and newer where the SDK would create transactions for itself. The fix is backwards compatible. (#3001)

Significant change in behavior

  • 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 for LogWarning changed to take the exception as the first parameter. That way it does no longer get mixed up with the TArgs. (#2987)

Dependencies

4.0.0-beta.6

13 Dec 16:59
Compare
Choose a tag to compare
4.0.0-beta.6 Pre-release
Pre-release

Feature

  • Support for Spotlight. Debug tool for local development. (#2961)
    • Enable it with option EnableSpotlight
    • Optionally configure the URL to connect via SpotlightUrl. Defaults to http://localhost:8969/stream.