diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7cdf7c28d0..abd5e74690 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,10 @@
- In MAUI Android apps, generate and inject UUID to APK and upload ProGuard mapping to Sentry with the UUID ([#4532](https://github.com/getsentry/sentry-dotnet/pull/4532))
- Fixed WASM0001 warning when building Blazor WebAssembly projects ([#4519](https://github.com/getsentry/sentry-dotnet/pull/4519))
+### API Changes
+
+- Remove `ExperimentalAttribute` from all _Structured Logs_ APIs, and remove `Experimental` property from `SentrySdk`, but keep `Experimental` property on `SentryOptions` ([#4567](https://github.com/getsentry/sentry-dotnet/pull/4567))
+
### Dependencies
- Bump Cocoa SDK from v8.56.0 to v8.56.1 ([#4555](https://github.com/getsentry/sentry-dotnet/pull/4555))
diff --git a/samples/Sentry.Samples.Console.Basic/Program.cs b/samples/Sentry.Samples.Console.Basic/Program.cs
index 6b1815bf93..dfc7723796 100644
--- a/samples/Sentry.Samples.Console.Basic/Program.cs
+++ b/samples/Sentry.Samples.Console.Basic/Program.cs
@@ -37,7 +37,7 @@
// This option tells Sentry to capture 100% of traces. You still need to start transactions and spans.
options.TracesSampleRate = 1.0;
- // This option enables Sentry Logs created via SentrySdk.Experimental.Logger.
+ // This option enables Sentry Logs created via SentrySdk.Logger.
options.Experimental.EnableLogs = true;
options.Experimental.SetBeforeSendLog(static log =>
{
@@ -73,7 +73,7 @@ async Task FirstFunction()
var httpClient = new HttpClient(messageHandler, true);
var html = await httpClient.GetStringAsync("https://example.com/");
WriteLine(html);
- SentrySdk.Experimental.Logger.LogInfo("HTTP Request completed.");
+ SentrySdk.Logger.LogInfo("HTTP Request completed.");
}
async Task SecondFunction()
@@ -94,7 +94,7 @@ async Task SecondFunction()
SentrySdk.CaptureException(exception);
span.Finish(exception);
- SentrySdk.Experimental.Logger.LogError(static log => log.SetAttribute("method", nameof(SecondFunction)),
+ SentrySdk.Logger.LogError(static log => log.SetAttribute("method", nameof(SecondFunction)),
"Error with message: {0}", exception.Message);
}
@@ -109,7 +109,7 @@ async Task ThirdFunction()
// Simulate doing some work
await Task.Delay(100);
- SentrySdk.Experimental.Logger.LogFatal(static log => log.SetAttribute("suppress", true),
+ SentrySdk.Logger.LogFatal(static log => log.SetAttribute("suppress", true),
"Crash imminent!");
// This is an example of an unhandled exception. It will be captured automatically.
diff --git a/src/Sentry/Extensibility/DisabledHub.cs b/src/Sentry/Extensibility/DisabledHub.cs
index ad6165a50a..e835a0edfc 100644
--- a/src/Sentry/Extensibility/DisabledHub.cs
+++ b/src/Sentry/Extensibility/DisabledHub.cs
@@ -257,8 +257,6 @@ public void CaptureUserFeedback(UserFeedback userFeedback)
///
/// Disabled Logger.
- /// This API is experimental and it may change in the future.
///
- [Experimental(Infrastructure.DiagnosticId.ExperimentalFeature)]
public SentryStructuredLogger Logger => DisabledSentryStructuredLogger.Instance;
}
diff --git a/src/Sentry/Extensibility/HubAdapter.cs b/src/Sentry/Extensibility/HubAdapter.cs
index 132997cb5f..e94a6c1914 100644
--- a/src/Sentry/Extensibility/HubAdapter.cs
+++ b/src/Sentry/Extensibility/HubAdapter.cs
@@ -34,10 +34,8 @@ private HubAdapter() { }
///
/// Forwards the call to .
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
- public SentryStructuredLogger Logger { [DebuggerStepThrough] get => SentrySdk.Experimental.Logger; }
+ public SentryStructuredLogger Logger { [DebuggerStepThrough] get => SentrySdk.Logger; }
///
/// Forwards the call to .
diff --git a/src/Sentry/IHub.cs b/src/Sentry/IHub.cs
index 7232aea817..8c3006c149 100644
--- a/src/Sentry/IHub.cs
+++ b/src/Sentry/IHub.cs
@@ -19,7 +19,6 @@ public interface IHub : ISentryClient, ISentryScopeManager
///
/// Creates and sends logs to Sentry.
- /// This API is experimental and it may change in the future.
///
///
/// Available options:
@@ -28,7 +27,6 @@ public interface IHub : ISentryClient, ISentryScopeManager
///
///
///
- [Experimental(Infrastructure.DiagnosticId.ExperimentalFeature)]
public SentryStructuredLogger Logger { get; }
///
diff --git a/src/Sentry/SentryLog.cs b/src/Sentry/SentryLog.cs
index 7e58fec173..3fec301b4e 100644
--- a/src/Sentry/SentryLog.cs
+++ b/src/Sentry/SentryLog.cs
@@ -1,14 +1,16 @@
using Sentry.Extensibility;
-using Sentry.Infrastructure;
using Sentry.Protocol;
namespace Sentry;
///
-/// Represents the Sentry Log protocol.
-/// This API is experimental and it may change in the future.
+/// Represents a Sentry Structured Log.
///
-[Experimental(DiagnosticId.ExperimentalFeature)]
+///
+/// Sentry Docs: .
+/// Sentry Developer Documentation: .
+/// Sentry .NET SDK Docs: .
+///
[DebuggerDisplay(@"SentryLog \{ Level = {Level}, Message = '{Message}' \}")]
public sealed class SentryLog
{
@@ -27,59 +29,44 @@ internal SentryLog(DateTimeOffset timestamp, SentryId traceId, SentryLogLevel le
///
/// The timestamp of the log.
- /// This API is experimental and it may change in the future.
///
///
/// Sent as seconds since the Unix epoch.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public required DateTimeOffset Timestamp { get; init; }
///
/// The trace id of the log.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public required SentryId TraceId { get; init; }
///
/// The severity level of the log.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public required SentryLogLevel Level { get; init; }
///
/// The formatted log message.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public required string Message { get; init; }
///
/// The parameterized template string.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public string? Template { get; init; }
///
/// The parameters to the template string.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public ImmutableArray> Parameters { get; init; }
///
/// The span id of the span that was active when the log was collected.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public SpanId? ParentSpanId { get; init; }
///
/// Gets the attribute value associated with the specified key.
- /// This API is experimental and it may change in the future.
///
///
/// Returns if the contains an attribute with the specified key and it's value is not .
@@ -128,7 +115,6 @@ internal SentryLog(DateTimeOffset timestamp, SentryId traceId, SentryLogLevel le
///
///
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public bool TryGetAttribute(string key, [NotNullWhen(true)] out object? value)
{
if (_attributes.TryGetValue(key, out var attribute) && attribute.Value is not null)
@@ -155,9 +141,7 @@ internal bool TryGetAttribute(string key, [NotNullWhen(true)] out string? value)
///
/// Set a key-value pair of data attached to the log.
- /// This API is experimental and it may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void SetAttribute(string key, object value)
{
_attributes[key] = new SentryAttribute(value);
diff --git a/src/Sentry/SentryLogLevel.cs b/src/Sentry/SentryLogLevel.cs
index 9ccde83f0d..f76a617571 100644
--- a/src/Sentry/SentryLogLevel.cs
+++ b/src/Sentry/SentryLogLevel.cs
@@ -1,11 +1,9 @@
using Sentry.Extensibility;
-using Sentry.Infrastructure;
namespace Sentry;
///
/// The severity of the structured log.
-/// This API is experimental and it may change in the future.
///
///
/// The named constants use the value of the lowest severity number per severity level:
@@ -41,7 +39,6 @@ namespace Sentry;
///
///
///
-[Experimental(DiagnosticId.ExperimentalFeature)]
public enum SentryLogLevel
{
///
diff --git a/src/Sentry/SentryOptions.cs b/src/Sentry/SentryOptions.cs
index df4e2937e3..cfed6098d8 100644
--- a/src/Sentry/SentryOptions.cs
+++ b/src/Sentry/SentryOptions.cs
@@ -1864,7 +1864,6 @@ internal static List GetDefaultInAppExclude() =>
///
/// This and related experimental APIs may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public SentryExperimentalOptions Experimental { get; set; } = new();
///
@@ -1873,7 +1872,6 @@ internal static List GetDefaultInAppExclude() =>
///
/// This and related experimental APIs may change in the future.
///
- [Experimental(DiagnosticId.ExperimentalFeature)]
public sealed class SentryExperimentalOptions
{
internal SentryExperimentalOptions()
@@ -1883,7 +1881,6 @@ internal SentryExperimentalOptions()
///
/// When set to , logs are sent to Sentry.
/// Defaults to .
- /// This API is experimental and it may change in the future.
///
///
public bool EnableLogs { get; set; } = false;
@@ -1895,7 +1892,6 @@ internal SentryExperimentalOptions()
///
/// Sets a callback function to be invoked before sending the log to Sentry.
/// When the delegate throws an during invocation, the log will not be captured.
- /// This API is experimental and it may change in the future.
///
///
/// It can be used to modify the log object before being sent to Sentry.
diff --git a/src/Sentry/SentrySdk.cs b/src/Sentry/SentrySdk.cs
index eab7b9838f..35f014447b 100644
--- a/src/Sentry/SentrySdk.cs
+++ b/src/Sentry/SentrySdk.cs
@@ -284,18 +284,8 @@ public void Dispose()
///
public static bool IsEnabled { [DebuggerStepThrough] get => CurrentHub.IsEnabled; }
- ///
- /// Experimental Sentry SDK features.
- ///
- ///
- /// This and related experimental APIs may change in the future.
- ///
- [Experimental(DiagnosticId.ExperimentalFeature)]
- public static class Experimental
- {
- ///
- public static SentryStructuredLogger Logger { [DebuggerStepThrough] get => CurrentHub.Logger; }
- }
+ ///
+ public static SentryStructuredLogger Logger { [DebuggerStepThrough] get => CurrentHub.Logger; }
///
/// Creates a new scope that will terminate when disposed.
diff --git a/src/Sentry/SentryStructuredLogger.Format.cs b/src/Sentry/SentryStructuredLogger.Format.cs
index 4575b5e0d9..cd7d8a4631 100644
--- a/src/Sentry/SentryStructuredLogger.Format.cs
+++ b/src/Sentry/SentryStructuredLogger.Format.cs
@@ -1,16 +1,12 @@
-using Sentry.Infrastructure;
-
namespace Sentry;
public abstract partial class SentryStructuredLogger
{
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogTrace(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Trace, template, parameters, null);
@@ -18,12 +14,10 @@ public void LogTrace(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogTrace(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Trace, template, parameters, configureLog);
@@ -31,11 +25,9 @@ public void LogTrace(Action configureLog, string template, params obj
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogDebug(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Debug, template, parameters, null);
@@ -43,12 +35,10 @@ public void LogDebug(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogDebug(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Debug, template, parameters, configureLog);
@@ -56,11 +46,9 @@ public void LogDebug(Action configureLog, string template, params obj
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogInfo(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Info, template, parameters, null);
@@ -68,12 +56,10 @@ public void LogInfo(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogInfo(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Info, template, parameters, configureLog);
@@ -81,11 +67,9 @@ public void LogInfo(Action configureLog, string template, params obje
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogWarning(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Warning, template, parameters, null);
@@ -93,12 +77,10 @@ public void LogWarning(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogWarning(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Warning, template, parameters, configureLog);
@@ -106,11 +88,9 @@ public void LogWarning(Action configureLog, string template, params o
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogError(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Error, template, parameters, null);
@@ -118,12 +98,10 @@ public void LogError(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogError(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Error, template, parameters, configureLog);
@@ -131,11 +109,9 @@ public void LogError(Action configureLog, string template, params obj
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogFatal(string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Fatal, template, parameters, null);
@@ -143,12 +119,10 @@ public void LogFatal(string template, params object[] parameters)
///
/// Creates and sends a structured log to Sentry, with severity , when enabled and sampled.
- /// This API is experimental and it may change in the future.
///
/// A delegate to set attributes on the . When the delegate throws an during invocation, the log will not be captured.
/// A formattable . When incompatible with the , the log will not be captured. See System.String.Format.
/// The arguments to the . See System.String.Format.
- [Experimental(DiagnosticId.ExperimentalFeature)]
public void LogFatal(Action configureLog, string template, params object[] parameters)
{
CaptureLog(SentryLogLevel.Fatal, template, parameters, configureLog);
diff --git a/src/Sentry/SentryStructuredLogger.cs b/src/Sentry/SentryStructuredLogger.cs
index 8a0dd9da1b..9d81bd2820 100644
--- a/src/Sentry/SentryStructuredLogger.cs
+++ b/src/Sentry/SentryStructuredLogger.cs
@@ -5,9 +5,7 @@ namespace Sentry;
///
/// Creates and sends logs to Sentry.
-/// This API is experimental and it may change in the future.
///
-[Experimental(DiagnosticId.ExperimentalFeature)]
public abstract partial class SentryStructuredLogger
{
internal static SentryStructuredLogger Create(IHub hub, SentryOptions options, ISystemClock clock)
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
index 444cbfe027..14734ce218 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
@@ -187,7 +187,6 @@ namespace Sentry
public interface IHub : Sentry.ISentryClient, Sentry.ISentryScopeManager
{
Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
Sentry.SentryStructuredLogger Logger { get; }
void BindException(System.Exception exception, Sentry.ISpan span);
Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope);
@@ -612,35 +611,24 @@ namespace Sentry
[System.Runtime.Serialization.EnumMember(Value="fatal")]
Fatal = 4,
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Diagnostics.DebuggerDisplay("SentryLog \\{ Level = {Level}, Message = \'{Message}\' \\}")]
[System.Runtime.CompilerServices.RequiredMember]
public sealed class SentryLog
{
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public Sentry.SentryLogLevel Level { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public string Message { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public System.Collections.Immutable.ImmutableArray> Parameters { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SpanId? ParentSpanId { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public string? Template { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public System.DateTimeOffset Timestamp { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public Sentry.SentryId TraceId { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void SetAttribute(string key, object value) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public bool TryGetAttribute(string key, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out object? value) { }
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public enum SentryLogLevel
{
Trace = 1,
@@ -720,7 +708,6 @@ namespace Sentry
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
@@ -807,7 +794,6 @@ namespace Sentry
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public sealed class SentryExperimentalOptions
{
public bool EnableLogs { get; set; }
@@ -844,6 +830,7 @@ namespace Sentry
{
public static bool IsEnabled { get; }
public static Sentry.SentryId LastEventId { get; }
+ public static Sentry.SentryStructuredLogger Logger { get; }
public static void AddBreadcrumb(Sentry.Breadcrumb breadcrumb, Sentry.SentryHint? hint = null) { }
public static void AddBreadcrumb(string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
public static void AddBreadcrumb(Sentry.Infrastructure.ISystemClock? clock, string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
@@ -904,11 +891,6 @@ namespace Sentry
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, Sentry.SentryTraceHeader traceHeader) { }
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, string? description) { }
public static void UnsetTag(string key) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
- public static class Experimental
- {
- public static Sentry.SentryStructuredLogger Logger { get; }
- }
}
public class SentrySession : Sentry.ISentrySession
{
@@ -988,34 +970,21 @@ namespace Sentry
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.SentryStackTrace FromJson(System.Text.Json.JsonElement json) { }
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public abstract class SentryStructuredLogger
{
protected abstract void CaptureLog(Sentry.SentryLog log);
protected abstract void Flush();
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogDebug(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogDebug(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogError(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogError(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogFatal(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogFatal(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogInfo(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogInfo(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogTrace(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogTrace(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogWarning(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogWarning(System.Action configureLog, string template, params object[] parameters) { }
}
public sealed class SentryThread : Sentry.ISentryJsonSerializable
@@ -1410,7 +1379,6 @@ namespace Sentry.Extensibility
public static readonly Sentry.Extensibility.DisabledHub Instance;
public bool IsEnabled { get; }
public Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryStructuredLogger Logger { get; }
public void BindClient(Sentry.ISentryClient client) { }
public void BindException(System.Exception exception, Sentry.ISpan span) { }
@@ -1458,7 +1426,6 @@ namespace Sentry.Extensibility
public static readonly Sentry.Extensibility.HubAdapter Instance;
public bool IsEnabled { get; }
public Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryStructuredLogger Logger { get; }
public void AddBreadcrumb(string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
public void AddBreadcrumb(Sentry.Infrastructure.ISystemClock clock, string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
index 444cbfe027..14734ce218 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
@@ -187,7 +187,6 @@ namespace Sentry
public interface IHub : Sentry.ISentryClient, Sentry.ISentryScopeManager
{
Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
Sentry.SentryStructuredLogger Logger { get; }
void BindException(System.Exception exception, Sentry.ISpan span);
Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope);
@@ -612,35 +611,24 @@ namespace Sentry
[System.Runtime.Serialization.EnumMember(Value="fatal")]
Fatal = 4,
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Diagnostics.DebuggerDisplay("SentryLog \\{ Level = {Level}, Message = \'{Message}\' \\}")]
[System.Runtime.CompilerServices.RequiredMember]
public sealed class SentryLog
{
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public Sentry.SentryLogLevel Level { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public string Message { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public System.Collections.Immutable.ImmutableArray> Parameters { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SpanId? ParentSpanId { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public string? Template { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public System.DateTimeOffset Timestamp { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
[System.Runtime.CompilerServices.RequiredMember]
public Sentry.SentryId TraceId { get; init; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void SetAttribute(string key, object value) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public bool TryGetAttribute(string key, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out object? value) { }
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public enum SentryLogLevel
{
Trace = 1,
@@ -720,7 +708,6 @@ namespace Sentry
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
@@ -807,7 +794,6 @@ namespace Sentry
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public sealed class SentryExperimentalOptions
{
public bool EnableLogs { get; set; }
@@ -844,6 +830,7 @@ namespace Sentry
{
public static bool IsEnabled { get; }
public static Sentry.SentryId LastEventId { get; }
+ public static Sentry.SentryStructuredLogger Logger { get; }
public static void AddBreadcrumb(Sentry.Breadcrumb breadcrumb, Sentry.SentryHint? hint = null) { }
public static void AddBreadcrumb(string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
public static void AddBreadcrumb(Sentry.Infrastructure.ISystemClock? clock, string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
@@ -904,11 +891,6 @@ namespace Sentry
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, Sentry.SentryTraceHeader traceHeader) { }
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, string? description) { }
public static void UnsetTag(string key) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
- public static class Experimental
- {
- public static Sentry.SentryStructuredLogger Logger { get; }
- }
}
public class SentrySession : Sentry.ISentrySession
{
@@ -988,34 +970,21 @@ namespace Sentry
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.SentryStackTrace FromJson(System.Text.Json.JsonElement json) { }
}
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public abstract class SentryStructuredLogger
{
protected abstract void CaptureLog(Sentry.SentryLog log);
protected abstract void Flush();
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogDebug(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogDebug(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogError(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogError(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogFatal(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogFatal(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogInfo(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogInfo(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogTrace(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogTrace(System.Action configureLog, string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogWarning(string template, params object[] parameters) { }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public void LogWarning(System.Action configureLog, string template, params object[] parameters) { }
}
public sealed class SentryThread : Sentry.ISentryJsonSerializable
@@ -1410,7 +1379,6 @@ namespace Sentry.Extensibility
public static readonly Sentry.Extensibility.DisabledHub Instance;
public bool IsEnabled { get; }
public Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryStructuredLogger Logger { get; }
public void BindClient(Sentry.ISentryClient client) { }
public void BindException(System.Exception exception, Sentry.ISpan span) { }
@@ -1458,7 +1426,6 @@ namespace Sentry.Extensibility
public static readonly Sentry.Extensibility.HubAdapter Instance;
public bool IsEnabled { get; }
public Sentry.SentryId LastEventId { get; }
- [System.Diagnostics.CodeAnalysis.Experimental("SENTRY0001")]
public Sentry.SentryStructuredLogger Logger { get; }
public void AddBreadcrumb(string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
public void AddBreadcrumb(Sentry.Infrastructure.ISystemClock clock, string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
index cd961b2d1d..6504a008d1 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
@@ -806,6 +806,7 @@ namespace Sentry
{
public static bool IsEnabled { get; }
public static Sentry.SentryId LastEventId { get; }
+ public static Sentry.SentryStructuredLogger Logger { get; }
public static void AddBreadcrumb(Sentry.Breadcrumb breadcrumb, Sentry.SentryHint? hint = null) { }
public static void AddBreadcrumb(string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
public static void AddBreadcrumb(Sentry.Infrastructure.ISystemClock? clock, string message, string? category = null, string? type = null, System.Collections.Generic.IDictionary? data = null, Sentry.BreadcrumbLevel level = 0) { }
@@ -866,10 +867,6 @@ namespace Sentry
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, Sentry.SentryTraceHeader traceHeader) { }
public static Sentry.ITransactionTracer StartTransaction(string name, string operation, string? description) { }
public static void UnsetTag(string key) { }
- public static class Experimental
- {
- public static Sentry.SentryStructuredLogger Logger { get; }
- }
}
public class SentrySession : Sentry.ISentrySession
{