diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e2ceb6fd..1ac85dcaf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## Unreleased
+## Features
+
+- The _Metrics_ APIs are now stable: removed `Experimental` from `SentrySdk` and `SentryOptions` ([#2615](https://github.com/getsentry/sentry-unity/pull/2615))
+
### Dependencies
- Bump Cocoa SDK from v9.7.0 to v9.8.0 ([#2596](https://github.com/getsentry/sentry-unity/pull/2596))
@@ -16,6 +20,9 @@
- Bump CLI from v3.3.3 to v3.3.5 ([#2604](https://github.com/getsentry/sentry-unity/pull/2604), [#2614](https://github.com/getsentry/sentry-unity/pull/2614))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#335)
- [diff](https://github.com/getsentry/sentry-cli/compare/3.3.3...3.3.5)
+- Bump .NET SDK from v6.2.0 to v6.3.0 ([#2615](https://github.com/getsentry/sentry-unity/pull/2615))
+ - [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#630)
+ - [diff](https://github.com/getsentry/sentry-dotnet/compare/6.2.0...6.3.0)
## 4.1.2
diff --git a/src/Sentry.Unity.Android/AndroidJavaScopeObserver.cs b/src/Sentry.Unity.Android/AndroidJavaScopeObserver.cs
index 55e51705f..fb037b172 100644
--- a/src/Sentry.Unity.Android/AndroidJavaScopeObserver.cs
+++ b/src/Sentry.Unity.Android/AndroidJavaScopeObserver.cs
@@ -36,4 +36,8 @@ public override void UnsetUserImpl() =>
public override void SetTraceImpl(SentryId traceId, SpanId spanId) =>
_sentryJava.SetTrace(traceId, spanId);
+
+ public override void AddAttachmentImpl(SentryAttachment attachment) { }
+
+ public override void ClearAttachmentsImpl() { }
}
diff --git a/src/Sentry.Unity.Native/NativeScopeObserver.cs b/src/Sentry.Unity.Native/NativeScopeObserver.cs
index bebeae55c..8b1a443de 100644
--- a/src/Sentry.Unity.Native/NativeScopeObserver.cs
+++ b/src/Sentry.Unity.Native/NativeScopeObserver.cs
@@ -43,6 +43,10 @@ public override void SetUserImpl(SentryUser user)
public override void SetTraceImpl(SentryId traceId, SpanId spanId) =>
C.sentry_set_trace(traceId.ToString(), spanId.ToString());
+ public override void AddAttachmentImpl(SentryAttachment attachment) { }
+
+ public override void ClearAttachmentsImpl() { }
+
private static string GetTimestamp(DateTimeOffset timestamp) =>
// "o": Using ISO 8601 to make sure the timestamp makes it to the bridge correctly.
// https://docs.microsoft.com/en-gb/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip
diff --git a/src/Sentry.Unity.iOS/NativeScopeObserver.cs b/src/Sentry.Unity.iOS/NativeScopeObserver.cs
index 8c8637eb4..00014bc1e 100644
--- a/src/Sentry.Unity.iOS/NativeScopeObserver.cs
+++ b/src/Sentry.Unity.iOS/NativeScopeObserver.cs
@@ -34,6 +34,10 @@ internal static string GetTimestamp(DateTimeOffset timestamp) =>
// https://docs.microsoft.com/en-gb/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip
timestamp.ToString("o");
+ public override void AddAttachmentImpl(SentryAttachment attachment) { }
+
+ public override void ClearAttachmentsImpl() { }
+
internal static int GetBreadcrumbLevel(BreadcrumbLevel breadcrumbLevel) =>
// https://github.com/getsentry/sentry-cocoa/blob/50f955aeb214601dd62b5dae7abdaddc8a1f24d9/Sources/Sentry/Public/SentryDefines.h#L99-L105
breadcrumbLevel switch
diff --git a/src/Sentry.Unity/ScopeObserver.cs b/src/Sentry.Unity/ScopeObserver.cs
index 556a83da4..d4f66c6cc 100644
--- a/src/Sentry.Unity/ScopeObserver.cs
+++ b/src/Sentry.Unity/ScopeObserver.cs
@@ -86,4 +86,20 @@ public void SetTrace(SentryId traceId, SpanId spanId)
}
public abstract void SetTraceImpl(SentryId traceId, SpanId spanId);
+
+ public void AddAttachment(SentryAttachment attachment)
+ {
+ _options.LogDebug("{0} Scope Sync - Adding attachment", _name);
+ AddAttachmentImpl(attachment);
+ }
+
+ public abstract void AddAttachmentImpl(SentryAttachment attachment);
+
+ public void ClearAttachments()
+ {
+ _options.LogDebug("{0} Scope Sync - Clearing attachments", _name);
+ ClearAttachmentsImpl();
+ }
+
+ public abstract void ClearAttachmentsImpl();
}
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..5a0849a00 100644
--- a/src/Sentry.Unity/SentrySdk.Dotnet.cs
+++ b/src/Sentry.Unity/SentrySdk.Dotnet.cs
@@ -56,8 +56,7 @@ public static partial class SentrySdk
///
///
/// Use this property to access structured logging functionality. Logs are only sent when
- /// 's
- /// is set to true.
+ /// is set to true.
///
///
public static SentryStructuredLogger Logger { [DebuggerStepThrough] get => Sentry.SentrySdk.Logger; }
@@ -548,32 +547,11 @@ public static void ResumeSession()
public static void CauseCrash(CrashType crashType) => Sentry.SentrySdk.CauseCrash(crashType);
///
- /// Sentry features that are currently in an experimental state.
+ /// Gets the metric emitter for emitting counters, gauges, and distributions connected to traces.
///
- ///
- /// 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
+ public static SentryMetricEmitter Metrics
{
- internal ExperimentalSentrySdk()
- {
- }
-
- ///
- /// Gets the metric emitter for emitting counters, gauges, and distributions connected to traces.
- ///
- public SentryMetricEmitter Metrics
- {
- [DebuggerStepThrough]
- get => Sentry.SentrySdk.Experimental.Metrics;
- }
+ [DebuggerStepThrough]
+ get => Sentry.SentrySdk.Metrics;
}
}
diff --git a/src/sentry-dotnet b/src/sentry-dotnet
index 248f45541..4a79de0a4 160000
--- a/src/sentry-dotnet
+++ b/src/sentry-dotnet
@@ -1 +1 @@
-Subproject commit 248f45541c5e23e7fe425cdeb98c187389de0aa8
+Subproject commit 4a79de0a4b5f8e0677e14d7c994f1c42cfad7acd