diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c5497c29..57d81d31b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,16 @@ ## Unreleased +### Features + +- Metrics are no longer experimental ([#2592](https://github.com/getsentry/sentry-unity/pull/2592)) + +## 4.1.2 + ### Fixes - `CaptureFeedback` now returns a `SentryId` and exposes a `CaptureFeedbackResult` out parameter to indicate whether feedback was captured successfully ([#2589](https://github.com/getsentry/sentry-unity/pull/2579)) -- When exporting a NSP ROM File for Switch the SKD now correctly uploads the debug symbols ([#2580](https://github.com/getsentry/sentry-unity/pull/2580)) +- When exporting a NSP ROM File for Switch the SKD now correctly uploads the debug symbols ([#2580](https://github.com/getsentry/sentry-unity/pull/2580)) - The SDK now also uses `.sentry-native` as a subdirectory for native support on desktop platforms. It now also falls back to `Application.persistentDataPath` instead of the current working directory. Note: `crashedLastRun` may report `false` for the first time after upgrading. ([#2547](https://github.com/getsentry/sentry-unity/pull/2547)) - The currently experimental Metrics are now opt-in by default ([#2546](https://github.com/getsentry/sentry-unity/pull/2546)) - When targeting Android, the SDK now syncs `AppStartTime` and `AppBuildType` to the native layer ([#2557](https://github.com/getsentry/sentry-unity/pull/2557)) diff --git a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs index 55f4ad6a1..87e93fbb4 100644 --- a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs +++ b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs @@ -228,7 +228,7 @@ internal SentryUnityOptions ToSentryUnityOptions( AddBreadcrumbsWithStructuredLogs = AddBreadcrumbsWithStructuredLogs }; - options.Experimental.EnableMetrics = EnableMetrics; + options.EnableMetrics = EnableMetrics; // By default, the cacheDirectoryPath gets set on known platforms. We're overwriting this behaviour here. if (!EnableOfflineCaching) diff --git a/src/Sentry.Unity/SentrySdk.Dotnet.cs b/src/Sentry.Unity/SentrySdk.Dotnet.cs index 2539aa3b2..3b2c55ace 100644 --- a/src/Sentry.Unity/SentrySdk.Dotnet.cs +++ b/src/Sentry.Unity/SentrySdk.Dotnet.cs @@ -54,14 +54,21 @@ public static partial class SentrySdk /// /// Gets the structured logger instance for creating and sending logs to Sentry. /// - /// - /// Use this property to access structured logging functionality. Logs are only sent when - /// 's - /// is set to true. - /// /// public static SentryStructuredLogger Logger { [DebuggerStepThrough] get => Sentry.SentrySdk.Logger; } + /// + /// Generates and sends metrics to Sentry. + /// + /// + /// Available options: + /// + /// + /// + /// + /// + public static SentryMetricEmitter Metrics { [DebuggerStepThrough] get => Sentry.SentrySdk.Metrics; } + /// /// Creates a new scope that will terminate when disposed. /// @@ -546,34 +553,4 @@ public static void ResumeSession() /// [Obsolete("WARNING: This method deliberately causes a crash, and should not be used in a real application.")] public static void CauseCrash(CrashType crashType) => Sentry.SentrySdk.CauseCrash(crashType); - - /// - /// Sentry features that are currently in an experimental state. - /// - /// - /// Experimental features are subject to binary, source and behavioral breaking changes in future updates. - /// - public static ExperimentalSentrySdk Experimental { get; } = new(); - - /// - /// Sentry features that are currently in an experimental state. - /// - /// - /// Experimental features are subject to binary, source and behavioral breaking changes in future updates. - /// - public sealed class ExperimentalSentrySdk - { - internal ExperimentalSentrySdk() - { - } - - /// - /// Gets the metric emitter for emitting counters, gauges, and distributions connected to traces. - /// - public SentryMetricEmitter Metrics - { - [DebuggerStepThrough] - get => Sentry.SentrySdk.Experimental.Metrics; - } - } }