diff --git a/benchmarks/Sentry.Benchmarks/Extensions.Logging/SentryStructuredLoggerBenchmarks.cs b/benchmarks/Sentry.Benchmarks/Extensions.Logging/SentryStructuredLoggerBenchmarks.cs
index 3e18747a65..08beda17f3 100644
--- a/benchmarks/Sentry.Benchmarks/Extensions.Logging/SentryStructuredLoggerBenchmarks.cs
+++ b/benchmarks/Sentry.Benchmarks/Extensions.Logging/SentryStructuredLoggerBenchmarks.cs
@@ -22,16 +22,13 @@ public void Setup()
SentryLoggingOptions options = new()
{
Dsn = DsnSamples.ValidDsn,
- Experimental =
- {
- EnableLogs = true,
- },
+ EnableLogs = true,
ExperimentalLogging =
{
MinimumLogLevel = LogLevel.Information,
}
};
- options.Experimental.SetBeforeSendLog((SentryLog log) =>
+ options.SetBeforeSendLog((SentryLog log) =>
{
_lastLog = log;
return null;
diff --git a/benchmarks/Sentry.Benchmarks/StructuredLogBatchProcessorBenchmarks.cs b/benchmarks/Sentry.Benchmarks/StructuredLogBatchProcessorBenchmarks.cs
index 9085068cce..4a2d1fc981 100644
--- a/benchmarks/Sentry.Benchmarks/StructuredLogBatchProcessorBenchmarks.cs
+++ b/benchmarks/Sentry.Benchmarks/StructuredLogBatchProcessorBenchmarks.cs
@@ -22,10 +22,7 @@ public void Setup()
SentryOptions options = new()
{
Dsn = DsnSamples.ValidDsn,
- Experimental =
- {
- EnableLogs = true,
- },
+ EnableLogs = true,
};
var batchInterval = Timeout.InfiniteTimeSpan;
diff --git a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
index 221a10293b..18cee62d80 100644
--- a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
+++ b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
@@ -17,7 +17,7 @@
#endif
// This option enables Logs sent to Sentry.
- options.Experimental.EnableLogs = true;
+ options.EnableLogs = true;
});
var app = builder.Build();
diff --git a/samples/Sentry.Samples.Console.Basic/Program.cs b/samples/Sentry.Samples.Console.Basic/Program.cs
index 1a2605c0ee..a75b3d379e 100644
--- a/samples/Sentry.Samples.Console.Basic/Program.cs
+++ b/samples/Sentry.Samples.Console.Basic/Program.cs
@@ -38,8 +38,8 @@
options.TracesSampleRate = 1.0;
// This option enables Sentry Logs created via SentrySdk.Logger.
- options.Experimental.EnableLogs = true;
- options.Experimental.SetBeforeSendLog(static log =>
+ options.EnableLogs = true;
+ options.SetBeforeSendLog(static log =>
{
// A demonstration of how you can drop logs based on some attribute they have
if (log.TryGetAttribute("suppress", out var attribute) && attribute is true)
diff --git a/samples/Sentry.Samples.ME.Logging/Program.cs b/samples/Sentry.Samples.ME.Logging/Program.cs
index 0178235c03..996a2aa59f 100644
--- a/samples/Sentry.Samples.ME.Logging/Program.cs
+++ b/samples/Sentry.Samples.ME.Logging/Program.cs
@@ -26,8 +26,8 @@
options.ExperimentalLogging.MinimumLogLevel = LogLevel.Trace; // This level or above will result in log sent to Sentry
// This option enables Logs sent to Sentry.
- options.Experimental.EnableLogs = true;
- options.Experimental.SetBeforeSendLog(static log =>
+ options.EnableLogs = true;
+ options.SetBeforeSendLog(static log =>
{
log.SetAttribute("attribute-key", "attribute-value");
return log;
diff --git a/samples/Sentry.Samples.Maui/MauiProgram.cs b/samples/Sentry.Samples.Maui/MauiProgram.cs
index 1a8a6a30a7..0c45693cf2 100644
--- a/samples/Sentry.Samples.Maui/MauiProgram.cs
+++ b/samples/Sentry.Samples.Maui/MauiProgram.cs
@@ -33,7 +33,7 @@ public static MauiApp CreateMauiApp()
options.AttachScreenshot = true;
options.Debug = true;
- options.Experimental.EnableLogs = true;
+ options.EnableLogs = true;
options.SampleRate = 1.0F;
// The Sentry MVVM Community Toolkit integration automatically creates traces for async relay commands,
diff --git a/samples/Sentry.Samples.Serilog/Program.cs b/samples/Sentry.Samples.Serilog/Program.cs
index c1822a3714..127a47ccdb 100644
--- a/samples/Sentry.Samples.Serilog/Program.cs
+++ b/samples/Sentry.Samples.Serilog/Program.cs
@@ -26,7 +26,7 @@ private static void Main()
options.MinimumEventLevel = LogEventLevel.Error;
options.AttachStacktrace = true;
// send structured logs to Sentry
- options.Experimental.EnableLogs = true;
+ options.EnableLogs = true;
// send PII like the username of the user logged in to the device
options.SendDefaultPii = true;
// Optional Serilog text formatter used to format LogEvent to string. If TextFormatter is set, FormatProvider is ignored.
diff --git a/src/Sentry.Extensions.Logging/SentryStructuredLogger.cs b/src/Sentry.Extensions.Logging/SentryStructuredLogger.cs
index 43cb0f17a7..d38fcf6f70 100644
--- a/src/Sentry.Extensions.Logging/SentryStructuredLogger.cs
+++ b/src/Sentry.Extensions.Logging/SentryStructuredLogger.cs
@@ -29,7 +29,7 @@ internal SentryStructuredLogger(string categoryName, SentryLoggingOptions option
public bool IsEnabled(LogLevel logLevel)
{
return _hub.IsEnabled
- && _options.Experimental.EnableLogs
+ && _options.EnableLogs
&& logLevel != LogLevel.None
&& logLevel >= _options.ExperimentalLogging.MinimumLogLevel;
}
diff --git a/src/Sentry.Serilog/SentrySink.cs b/src/Sentry.Serilog/SentrySink.cs
index 4a4ad3e7f7..f00556794b 100644
--- a/src/Sentry.Serilog/SentrySink.cs
+++ b/src/Sentry.Serilog/SentrySink.cs
@@ -84,7 +84,7 @@ private bool IsEnabled(LogEvent logEvent)
return logEvent.Level >= _options.MinimumEventLevel
|| logEvent.Level >= _options.MinimumBreadcrumbLevel
- || options?.Experimental.EnableLogs is true;
+ || options?.EnableLogs is true;
}
private void InnerEmit(LogEvent logEvent)
@@ -169,7 +169,7 @@ private void InnerEmit(LogEvent logEvent)
// In cases where Sentry's Serilog-Sink is added without a DSN (i.e., without initializing the SDK) and the SDK is initialized differently (e.g., through ASP.NET Core),
// then the 'EnableLogs' option of this Sink's Serilog-Options is default, but the Hub's Sentry-Options have the actual user-defined value configured.
var options = hub.GetSentryOptions();
- if (options?.Experimental.EnableLogs is true)
+ if (options?.EnableLogs is true)
{
CaptureStructuredLog(hub, options, logEvent, formatted, template);
}
diff --git a/src/Sentry.Serilog/SentrySinkExtensions.cs b/src/Sentry.Serilog/SentrySinkExtensions.cs
index e300ae1697..7a823c3d89 100644
--- a/src/Sentry.Serilog/SentrySinkExtensions.cs
+++ b/src/Sentry.Serilog/SentrySinkExtensions.cs
@@ -35,7 +35,7 @@ public static class SentrySinkExtensions
/// What mode to use for reporting referenced assemblies in each event sent to sentry. Defaults to
/// What modes to use for event automatic de-duplication.
/// Default tags to add to all events.
- /// Whether to send structured logs.
+ /// Whether to send structured logs.
///
/// This sample shows how each item may be set from within a configuration file:
///
@@ -73,7 +73,7 @@ public static class SentrySinkExtensions
/// "key-1", "value-1",
/// "key-2", "value-2"
/// },
- /// "experimentalEnableLogs": true
+ /// "enableLogs": true
/// }
/// }
/// ]
@@ -106,7 +106,7 @@ public static LoggerConfiguration Sentry(
ReportAssembliesMode? reportAssembliesMode = null,
DeduplicateMode? deduplicateMode = null,
Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = null)
+ bool? enableLogs = null)
{
return loggerConfiguration.Sentry(o => ConfigureSentrySerilogOptions(o,
dsn,
@@ -132,7 +132,7 @@ public static LoggerConfiguration Sentry(
reportAssembliesMode,
deduplicateMode,
defaultTags,
- experimentalEnableLogs));
+ enableLogs));
}
///
@@ -210,7 +210,7 @@ internal static void ConfigureSentrySerilogOptions(
ReportAssembliesMode? reportAssembliesMode = null,
DeduplicateMode? deduplicateMode = null,
Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = null)
+ bool? enableLogs = null)
{
if (dsn is not null)
{
@@ -322,9 +322,9 @@ internal static void ConfigureSentrySerilogOptions(
sentrySerilogOptions.DeduplicateMode = deduplicateMode.Value;
}
- if (experimentalEnableLogs.HasValue)
+ if (enableLogs.HasValue)
{
- sentrySerilogOptions.Experimental.EnableLogs = experimentalEnableLogs.Value;
+ sentrySerilogOptions.EnableLogs = enableLogs.Value;
}
// Serilog-specific items
diff --git a/src/Sentry/BindableSentryOptions.cs b/src/Sentry/BindableSentryOptions.cs
index c3314257f8..bbadddaf33 100644
--- a/src/Sentry/BindableSentryOptions.cs
+++ b/src/Sentry/BindableSentryOptions.cs
@@ -21,6 +21,7 @@ internal partial class BindableSentryOptions
public string? Distribution { get; set; }
public string? Environment { get; set; }
public string? Dsn { get; set; }
+ public bool? EnableLogs { get; set; }
public int? MaxQueueItems { get; set; }
public int? MaxCacheItems { get; set; }
public TimeSpan? ShutdownTimeout { get; set; }
@@ -55,13 +56,6 @@ internal partial class BindableSentryOptions
public bool? EnableSpotlight { get; set; }
public string? SpotlightUrl { get; set; }
- public BindableSentryExperimentalOptions Experimental { get; set; } = new();
-
- internal sealed class BindableSentryExperimentalOptions
- {
- public bool? EnableLogs { get; set; }
- }
-
public void ApplyTo(SentryOptions options)
{
options.IsGlobalModeEnabled = IsGlobalModeEnabled ?? options.IsGlobalModeEnabled;
@@ -78,6 +72,7 @@ public void ApplyTo(SentryOptions options)
options.Distribution = Distribution ?? options.Distribution;
options.Environment = Environment ?? options.Environment;
options.Dsn = Dsn ?? options.Dsn;
+ options.EnableLogs = EnableLogs ?? options.EnableLogs;
options.MaxQueueItems = MaxQueueItems ?? options.MaxQueueItems;
options.MaxCacheItems = MaxCacheItems ?? options.MaxCacheItems;
options.ShutdownTimeout = ShutdownTimeout ?? options.ShutdownTimeout;
@@ -111,8 +106,6 @@ public void ApplyTo(SentryOptions options)
options.EnableSpotlight = EnableSpotlight ?? options.EnableSpotlight;
options.SpotlightUrl = SpotlightUrl ?? options.SpotlightUrl;
- options.Experimental.EnableLogs = Experimental.EnableLogs ?? options.Experimental.EnableLogs;
-
#if ANDROID
Android.ApplyTo(options.Android);
Native.ApplyTo(options.Native);
diff --git a/src/Sentry/IHub.cs b/src/Sentry/IHub.cs
index b4d62138bf..076f454f3f 100644
--- a/src/Sentry/IHub.cs
+++ b/src/Sentry/IHub.cs
@@ -23,8 +23,8 @@ public interface IHub : ISentryClient, ISentryScopeManager
///
/// Available options:
///
- ///
- ///
+ ///
+ ///
///
///
public SentryStructuredLogger Logger { get; }
diff --git a/src/Sentry/Internal/DefaultSentryStructuredLogger.cs b/src/Sentry/Internal/DefaultSentryStructuredLogger.cs
index 1f13191ed2..90f6df853a 100644
--- a/src/Sentry/Internal/DefaultSentryStructuredLogger.cs
+++ b/src/Sentry/Internal/DefaultSentryStructuredLogger.cs
@@ -14,7 +14,7 @@ internal sealed class DefaultSentryStructuredLogger : SentryStructuredLogger, ID
internal DefaultSentryStructuredLogger(IHub hub, SentryOptions options, ISystemClock clock, int batchCount, TimeSpan batchInterval)
{
Debug.Assert(hub.IsEnabled);
- Debug.Assert(options is { Experimental.EnableLogs: true });
+ Debug.Assert(options is { EnableLogs: true });
_hub = hub;
_options = options;
@@ -79,7 +79,7 @@ protected internal override void CaptureLog(SentryLog log)
{
var configuredLog = log;
- if (_options.Experimental.BeforeSendLogInternal is { } beforeSendLog)
+ if (_options.BeforeSendLogInternal is { } beforeSendLog)
{
try
{
diff --git a/src/Sentry/SentryOptions.cs b/src/Sentry/SentryOptions.cs
index 67e7248f11..f3ad6710a1 100644
--- a/src/Sentry/SentryOptions.cs
+++ b/src/Sentry/SentryOptions.cs
@@ -544,6 +544,31 @@ public void SetBeforeBreadcrumb(Func beforeBreadcrumb)
_beforeBreadcrumb = (breadcrumb, _) => beforeBreadcrumb(breadcrumb);
}
+ ///
+ /// When set to , logs are sent to Sentry.
+ /// Defaults to .
+ ///
+ ///
+ public bool EnableLogs { get; set; } = false;
+
+ private Func? _beforeSendLog;
+
+ internal Func? BeforeSendLogInternal => _beforeSendLog;
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// It can be used to modify the log object before being sent to Sentry.
+ /// To prevent the log from being sent to Sentry, return .
+ ///
+ ///
+ public void SetBeforeSendLog(Func beforeSendLog)
+ {
+ _beforeSendLog = beforeSendLog;
+ }
+
private int _maxQueueItems = 30;
///
@@ -1878,50 +1903,4 @@ internal static List GetDefaultInAppExclude() =>
"ServiceStack",
"Java.Interop",
];
-
- ///
- /// Experimental Sentry features.
- ///
- ///
- /// This and related experimental APIs may change in the future.
- ///
- public SentryExperimentalOptions Experimental { get; set; } = new();
-
- ///
- /// Experimental Sentry SDK options.
- ///
- ///
- /// This and related experimental APIs may change in the future.
- ///
- public class SentryExperimentalOptions
- {
- internal SentryExperimentalOptions()
- {
- }
-
- ///
- /// When set to , logs are sent to Sentry.
- /// Defaults to .
- ///
- ///
- public bool EnableLogs { get; set; } = false;
-
- private Func? _beforeSendLog;
-
- internal Func? BeforeSendLogInternal => _beforeSendLog;
-
- ///
- /// 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.
- ///
- ///
- /// It can be used to modify the log object before being sent to Sentry.
- /// To prevent the log from being sent to Sentry, return .
- ///
- ///
- public void SetBeforeSendLog(Func beforeSendLog)
- {
- _beforeSendLog = beforeSendLog;
- }
- }
}
diff --git a/src/Sentry/SentryStructuredLogger.cs b/src/Sentry/SentryStructuredLogger.cs
index 9d81bd2820..f7da834ade 100644
--- a/src/Sentry/SentryStructuredLogger.cs
+++ b/src/Sentry/SentryStructuredLogger.cs
@@ -13,7 +13,7 @@ internal static SentryStructuredLogger Create(IHub hub, SentryOptions options, I
internal static SentryStructuredLogger Create(IHub hub, SentryOptions options, ISystemClock clock, int batchCount, TimeSpan batchInterval)
{
- return options.Experimental.EnableLogs
+ return options.EnableLogs
? new DefaultSentryStructuredLogger(hub, options, clock, batchCount, batchInterval)
: DisabledSentryStructuredLogger.Instance;
}
diff --git a/test/Sentry.AspNetCore.Tests/SentryAspNetCoreStructuredLoggerProviderTests.cs b/test/Sentry.AspNetCore.Tests/SentryAspNetCoreStructuredLoggerProviderTests.cs
index d19cdf5cc4..def969676a 100644
--- a/test/Sentry.AspNetCore.Tests/SentryAspNetCoreStructuredLoggerProviderTests.cs
+++ b/test/Sentry.AspNetCore.Tests/SentryAspNetCoreStructuredLoggerProviderTests.cs
@@ -18,7 +18,7 @@ private class Fixture
public Fixture()
{
var loggingOptions = new SentryAspNetCoreOptions();
- loggingOptions.Experimental.EnableLogs = true;
+ loggingOptions.EnableLogs = true;
Options = Microsoft.Extensions.Options.Options.Create(loggingOptions);
Hub = Substitute.For();
diff --git a/test/Sentry.Extensions.Logging.Tests/SentryLoggingOptionsSetupTests.cs b/test/Sentry.Extensions.Logging.Tests/SentryLoggingOptionsSetupTests.cs
index 9321b3aa64..798dad7bf2 100644
--- a/test/Sentry.Extensions.Logging.Tests/SentryLoggingOptionsSetupTests.cs
+++ b/test/Sentry.Extensions.Logging.Tests/SentryLoggingOptionsSetupTests.cs
@@ -25,6 +25,7 @@ public void Configure_BindsConfigurationToOptions()
Distribution = "FakeDistribution",
Environment = "Test",
Dsn = "https://d4d82fc1c2c4032a83f3a29aa3a3aff@fake-sentry.io:65535/2147483647",
+ EnableLogs = true,
MaxQueueItems = 8,
MaxCacheItems = 9,
ShutdownTimeout = TimeSpan.FromSeconds(13),
@@ -57,7 +58,6 @@ public void Configure_BindsConfigurationToOptions()
MinimumEventLevel = LogLevel.Error,
InitializeSdk = true
};
- expected.Experimental.EnableLogs = true;
expected.ExperimentalLogging.MinimumLogLevel = LogLevel.None;
var config = new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary
@@ -76,6 +76,7 @@ public void Configure_BindsConfigurationToOptions()
["Distribution"] = expected.Distribution,
["Environment"] = expected.Environment,
["Dsn"] = expected.Dsn,
+ ["EnableLogs"] = expected.EnableLogs.ToString(),
["MaxQueueItems"] = expected.MaxQueueItems.ToString(),
["MaxCacheItems"] = expected.MaxCacheItems.ToString(),
["ShutdownTimeout"] = expected.ShutdownTimeout.ToString(),
@@ -109,7 +110,6 @@ public void Configure_BindsConfigurationToOptions()
["MinimumEventLevel"] = expected.MinimumEventLevel.ToString(),
["InitializeSdk"] = expected.InitializeSdk.ToString(),
- ["Experimental:EnableLogs"] = expected.Experimental.EnableLogs.ToString(),
["ExperimentalLogging:MinimumLogLevel"] = expected.ExperimentalLogging.MinimumLogLevel.ToString(),
})
.Build();
@@ -139,6 +139,7 @@ public void Configure_BindsConfigurationToOptions()
actual.Distribution.Should().Be(expected.Distribution);
actual.Environment.Should().Be(expected.Environment);
actual.Dsn.Should().Be(expected.Dsn);
+ actual.EnableLogs.Should().Be(expected.EnableLogs);
actual.MaxQueueItems.Should().Be(expected.MaxQueueItems);
actual.MaxCacheItems.Should().Be(expected.MaxCacheItems);
actual.ShutdownTimeout.Should().Be(expected.ShutdownTimeout);
@@ -169,7 +170,6 @@ public void Configure_BindsConfigurationToOptions()
actual.MinimumEventLevel.Should().Be(expected.MinimumEventLevel);
actual.InitializeSdk.Should().Be(expected.InitializeSdk);
- actual.Experimental.EnableLogs.Should().Be(expected.Experimental.EnableLogs);
actual.ExperimentalLogging.MinimumLogLevel.Should().Be(expected.ExperimentalLogging.MinimumLogLevel);
}
}
diff --git a/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerProviderTests.cs b/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerProviderTests.cs
index a8c52f13da..4d0afafcc0 100644
--- a/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerProviderTests.cs
+++ b/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerProviderTests.cs
@@ -18,7 +18,7 @@ private class Fixture
public Fixture()
{
var loggingOptions = new SentryLoggingOptions();
- loggingOptions.Experimental.EnableLogs = true;
+ loggingOptions.EnableLogs = true;
Options = Microsoft.Extensions.Options.Options.Create(loggingOptions);
Hub = Substitute.For();
diff --git a/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerTests.cs b/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerTests.cs
index dbede60ff9..4c2424967a 100644
--- a/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerTests.cs
+++ b/test/Sentry.Extensions.Logging.Tests/SentryStructuredLoggerTests.cs
@@ -48,7 +48,7 @@ public Fixture()
}
public void EnableHub(bool isEnabled) => Hub.IsEnabled.Returns(isEnabled);
- public void EnableLogs(bool isEnabled) => Options.Value.Experimental.EnableLogs = isEnabled;
+ public void EnableLogs(bool isEnabled) => Options.Value.EnableLogs = isEnabled;
public void SetMinimumLogLevel(LogLevel logLevel) => Options.Value.ExperimentalLogging.MinimumLogLevel = logLevel;
public void WithActiveSpan(SentryId traceId, SpanId parentSpanId)
diff --git a/test/Sentry.Maui.Tests/Internal/SentryMauiStructuredLoggerProviderTests.cs b/test/Sentry.Maui.Tests/Internal/SentryMauiStructuredLoggerProviderTests.cs
index 425ced9bbe..20569aebe4 100644
--- a/test/Sentry.Maui.Tests/Internal/SentryMauiStructuredLoggerProviderTests.cs
+++ b/test/Sentry.Maui.Tests/Internal/SentryMauiStructuredLoggerProviderTests.cs
@@ -18,7 +18,7 @@ private class Fixture
public Fixture()
{
var loggingOptions = new SentryMauiOptions();
- loggingOptions.Experimental.EnableLogs = true;
+ loggingOptions.EnableLogs = true;
Options = Microsoft.Extensions.Options.Options.Create(loggingOptions);
Hub = Substitute.For();
diff --git a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
index f204ed0701..bb2d777e40 100644
--- a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
+++ b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
@@ -47,6 +47,6 @@ namespace Serilog
Sentry.ReportAssembliesMode? reportAssembliesMode = default,
Sentry.DeduplicateMode? deduplicateMode = default,
System.Collections.Generic.Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = default) { }
+ bool? enableLogs = default) { }
}
}
\ No newline at end of file
diff --git a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
index f204ed0701..bb2d777e40 100644
--- a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
+++ b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
@@ -47,6 +47,6 @@ namespace Serilog
Sentry.ReportAssembliesMode? reportAssembliesMode = default,
Sentry.DeduplicateMode? deduplicateMode = default,
System.Collections.Generic.Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = default) { }
+ bool? enableLogs = default) { }
}
}
\ No newline at end of file
diff --git a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
index f204ed0701..bb2d777e40 100644
--- a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
+++ b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
@@ -47,6 +47,6 @@ namespace Serilog
Sentry.ReportAssembliesMode? reportAssembliesMode = default,
Sentry.DeduplicateMode? deduplicateMode = default,
System.Collections.Generic.Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = default) { }
+ bool? enableLogs = default) { }
}
}
\ No newline at end of file
diff --git a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
index f204ed0701..bb2d777e40 100644
--- a/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
+++ b/test/Sentry.Serilog.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
@@ -47,6 +47,6 @@ namespace Serilog
Sentry.ReportAssembliesMode? reportAssembliesMode = default,
Sentry.DeduplicateMode? deduplicateMode = default,
System.Collections.Generic.Dictionary? defaultTags = null,
- bool? experimentalEnableLogs = default) { }
+ bool? enableLogs = default) { }
}
}
\ No newline at end of file
diff --git a/test/Sentry.Serilog.Tests/AspNetCoreIntegrationTests.cs b/test/Sentry.Serilog.Tests/AspNetCoreIntegrationTests.cs
index 760b5b84ff..3c2c9798b8 100644
--- a/test/Sentry.Serilog.Tests/AspNetCoreIntegrationTests.cs
+++ b/test/Sentry.Serilog.Tests/AspNetCoreIntegrationTests.cs
@@ -28,7 +28,7 @@ public async Task UnhandledException_MarkedAsUnhandled()
[Fact]
public async Task StructuredLogging_Disabled()
{
- Assert.False(ExperimentalEnableLogs);
+ Assert.False(EnableLogs);
var handler = new RequestHandler
{
@@ -51,7 +51,7 @@ public async Task StructuredLogging_Disabled()
[Fact]
public async Task StructuredLogging_Enabled()
{
- ExperimentalEnableLogs = true;
+ EnableLogs = true;
var handler = new RequestHandler
{
diff --git a/test/Sentry.Serilog.Tests/IntegrationTests.verify.cs b/test/Sentry.Serilog.Tests/IntegrationTests.verify.cs
index aab8e7dd17..ffbe50ae5d 100644
--- a/test/Sentry.Serilog.Tests/IntegrationTests.verify.cs
+++ b/test/Sentry.Serilog.Tests/IntegrationTests.verify.cs
@@ -113,7 +113,7 @@ public Task StructuredLogging()
_ =>
{
_.MinimumEventLevel = (LogEventLevel)int.MaxValue;
- _.Experimental.EnableLogs = true;
+ _.EnableLogs = true;
_.Transport = transport;
_.DiagnosticLogger = diagnosticLogger;
_.Dsn = ValidDsn;
diff --git a/test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs b/test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs
index c0cda5c45a..36c3f1f802 100644
--- a/test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs
+++ b/test/Sentry.Serilog.Tests/SentrySerilogSinkExtensionsTests.cs
@@ -25,10 +25,10 @@ private class Fixture
public SentryLevel DiagnosticLevel { get; } = SentryLevel.Warning;
public ReportAssembliesMode ReportAssembliesMode { get; } = ReportAssembliesMode.None;
public DeduplicateMode DeduplicateMode { get; } = DeduplicateMode.SameExceptionInstance;
+ public bool EnableLogs { get; } = false;
public bool InitializeSdk { get; } = false;
public LogEventLevel MinimumEventLevel { get; } = LogEventLevel.Verbose;
public LogEventLevel MinimumBreadcrumbLevel { get; } = LogEventLevel.Fatal;
- public bool ExperimentalEnableLogs { get; } = true;
public static SentrySerilogOptions GetSut() => new();
}
@@ -98,7 +98,7 @@ public void ConfigureSentrySerilogOptions_WithAllParameters_MakesAppropriateChan
_fixture.SampleRate, _fixture.Release, _fixture.Environment, _fixture.MaxQueueItems,
_fixture.ShutdownTimeout, _fixture.DecompressionMethods, _fixture.RequestBodyCompressionLevel,
_fixture.RequestBodyCompressionBuffered, _fixture.Debug, _fixture.DiagnosticLevel,
- _fixture.ReportAssembliesMode, _fixture.DeduplicateMode, null, _fixture.ExperimentalEnableLogs);
+ _fixture.ReportAssembliesMode, _fixture.DeduplicateMode, null, _fixture.EnableLogs);
// Compare individual properties
Assert.Equal(_fixture.SendDefaultPii, sut.SendDefaultPii);
@@ -119,7 +119,7 @@ public void ConfigureSentrySerilogOptions_WithAllParameters_MakesAppropriateChan
Assert.Equal(_fixture.DiagnosticLevel, sut.DiagnosticLevel);
Assert.Equal(_fixture.ReportAssembliesMode, sut.ReportAssembliesMode);
Assert.Equal(_fixture.DeduplicateMode, sut.DeduplicateMode);
- Assert.Equal(_fixture.ExperimentalEnableLogs, sut.Experimental.EnableLogs);
+ Assert.Equal(_fixture.EnableLogs, sut.EnableLogs);
Assert.True(sut.InitializeSdk);
Assert.Equal(_fixture.MinimumEventLevel, sut.MinimumEventLevel);
Assert.Equal(_fixture.MinimumBreadcrumbLevel, sut.MinimumBreadcrumbLevel);
diff --git a/test/Sentry.Serilog.Tests/SentrySinkTests.Structured.cs b/test/Sentry.Serilog.Tests/SentrySinkTests.Structured.cs
index dc061a37e5..aa0806ad25 100644
--- a/test/Sentry.Serilog.Tests/SentrySinkTests.Structured.cs
+++ b/test/Sentry.Serilog.Tests/SentrySinkTests.Structured.cs
@@ -11,7 +11,7 @@ public void Emit_StructuredLogging_IsEnabled(bool isEnabled)
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = isEnabled;
+ _fixture.Options.EnableLogs = isEnabled;
var sut = _fixture.GetSut();
var logger = new LoggerConfiguration().WriteTo.Sink(sut).MinimumLevel.Verbose().CreateLogger();
@@ -28,7 +28,7 @@ public void Emit_StructuredLogging_UseHubOptionsOverSinkOptions(bool isEnabled)
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
if (!isEnabled)
{
@@ -54,7 +54,7 @@ public void Emit_StructuredLogging_LogLevel(LogEventLevel level, SentryLogLevel
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var sut = _fixture.GetSut();
var logger = new LoggerConfiguration().WriteTo.Sink(sut).MinimumLevel.Verbose().CreateLogger();
@@ -71,7 +71,7 @@ public void Emit_StructuredLogging_LogEvent(bool withActiveSpan)
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
_fixture.Options.Environment = "test-environment";
_fixture.Options.Release = "test-release";
@@ -140,7 +140,7 @@ public void Emit_StructuredLoggingWithException_NoBreadcrumb()
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var sut = _fixture.GetSut();
var logger = new LoggerConfiguration().WriteTo.Sink(sut).MinimumLevel.Verbose().CreateLogger();
@@ -156,7 +156,7 @@ public void Emit_StructuredLoggingWithoutException_LeavesBreadcrumb()
{
InMemorySentryStructuredLogger capturer = new();
_fixture.Hub.Logger.Returns(capturer);
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var sut = _fixture.GetSut();
var logger = new LoggerConfiguration().WriteTo.Sink(sut).MinimumLevel.Verbose().CreateLogger();
diff --git a/test/Sentry.Serilog.Tests/SerilogAspNetSentrySdkTestFixture.cs b/test/Sentry.Serilog.Tests/SerilogAspNetSentrySdkTestFixture.cs
index b7b1a6d764..b453a9879c 100644
--- a/test/Sentry.Serilog.Tests/SerilogAspNetSentrySdkTestFixture.cs
+++ b/test/Sentry.Serilog.Tests/SerilogAspNetSentrySdkTestFixture.cs
@@ -8,7 +8,7 @@ public class SerilogAspNetSentrySdkTestFixture : AspNetSentrySdkTestFixture
protected List Events;
protected List Logs;
- protected bool ExperimentalEnableLogs { get; set; }
+ protected bool EnableLogs { get; set; }
protected override void ConfigureBuilder(WebHostBuilder builder)
{
@@ -19,8 +19,8 @@ protected override void ConfigureBuilder(WebHostBuilder builder)
{
options.SetBeforeSend((@event, _) => { Events.Add(@event); return @event; });
- options.Experimental.EnableLogs = ExperimentalEnableLogs;
- options.Experimental.SetBeforeSendLog(log => { Logs.Add(log); return log; });
+ options.EnableLogs = EnableLogs;
+ options.SetBeforeSendLog(log => { Logs.Add(log); return log; });
};
ConfigureApp = app =>
@@ -35,7 +35,7 @@ protected override void ConfigureBuilder(WebHostBuilder builder)
builder.ConfigureLogging(loggingBuilder =>
{
var logger = new LoggerConfiguration()
- .WriteTo.Sentry(ValidDsn, experimentalEnableLogs: ExperimentalEnableLogs)
+ .WriteTo.Sentry(ValidDsn, enableLogs: EnableLogs)
.CreateLogger();
loggingBuilder.AddSerilog(logger);
});
diff --git a/test/Sentry.Testing/BindableTests.cs b/test/Sentry.Testing/BindableTests.cs
index b8baf13c8e..f513d34e5d 100644
--- a/test/Sentry.Testing/BindableTests.cs
+++ b/test/Sentry.Testing/BindableTests.cs
@@ -65,10 +65,6 @@ private static KeyValuePair GetDummyBindableValue(Property
{$"key1", $"{propertyInfo.Name}value1"},
{$"key2", $"{propertyInfo.Name}value2"}
},
- not null when propertyType == typeof(SentryOptions.SentryExperimentalOptions) => new SentryOptions.SentryExperimentalOptions
- {
- EnableLogs = true,
- },
not null when propertyType.FullName == "Sentry.Extensions.Logging.SentryLoggingOptions+SentryLoggingExperimentalOptions" => CreateSentryLoggingExperimentalOptions(),
_ => throw new NotSupportedException($"Unsupported property type on property {propertyInfo.Name}")
};
@@ -95,11 +91,6 @@ private static IEnumerable> ToConfigValues(KeyValue
yield return new KeyValuePair($"{prop.Name}:{kvp.Key}", kvp.Value);
}
}
- else if (propertyType == typeof(SentryOptions.SentryExperimentalOptions))
- {
- var experimental = (SentryOptions.SentryExperimentalOptions)value;
- yield return new KeyValuePair($"{prop.Name}:{nameof(SentryOptions.SentryExperimentalOptions.EnableLogs)}", Convert.ToString(experimental.EnableLogs, CultureInfo.InvariantCulture));
- }
else if (propertyType.FullName == "Sentry.Extensions.Logging.SentryLoggingOptions+SentryLoggingExperimentalOptions")
{
var property = value.GetType().GetProperty("MinimumLogLevel");
@@ -139,10 +130,6 @@ protected void AssertContainsExpectedPropertyValues(TOptions actual)
{
actualValue.Should().BeEquivalentTo(expectedValue);
}
- else if (prop.PropertyType == typeof(SentryOptions.SentryExperimentalOptions))
- {
- actualValue.Should().BeEquivalentTo(expectedValue);
- }
else if (prop.PropertyType.FullName == "Sentry.Extensions.Logging.SentryLoggingOptions+SentryLoggingExperimentalOptions")
{
actualValue.Should().BeEquivalentTo(expectedValue);
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
index c9e1f7fb87..0275d82418 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet10_0.verified.txt
@@ -711,10 +711,10 @@ namespace Sentry
public string? Distribution { get; set; }
public string? Dsn { get; set; }
public bool EnableBackpressureHandling { get; set; }
+ public bool EnableLogs { get; set; }
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
@@ -798,14 +798,10 @@ namespace Sentry
public void SetBeforeBreadcrumb(System.Func beforeBreadcrumb) { }
public void SetBeforeSend(System.Func beforeSend) { }
public void SetBeforeSend(System.Func beforeSend) { }
+ public void SetBeforeSendLog(System.Func beforeSendLog) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- public class SentryExperimentalOptions
- {
- public bool EnableLogs { get; set; }
- public void SetBeforeSendLog(System.Func beforeSendLog) { }
- }
}
public sealed class SentryPackage : Sentry.ISentryJsonSerializable
{
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
index c9e1f7fb87..0275d82418 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
@@ -711,10 +711,10 @@ namespace Sentry
public string? Distribution { get; set; }
public string? Dsn { get; set; }
public bool EnableBackpressureHandling { get; set; }
+ public bool EnableLogs { get; set; }
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
@@ -798,14 +798,10 @@ namespace Sentry
public void SetBeforeBreadcrumb(System.Func beforeBreadcrumb) { }
public void SetBeforeSend(System.Func beforeSend) { }
public void SetBeforeSend(System.Func beforeSend) { }
+ public void SetBeforeSendLog(System.Func beforeSendLog) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- public class SentryExperimentalOptions
- {
- public bool EnableLogs { get; set; }
- public void SetBeforeSendLog(System.Func beforeSendLog) { }
- }
}
public sealed class SentryPackage : Sentry.ISentryJsonSerializable
{
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
index c9e1f7fb87..0275d82418 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt
@@ -711,10 +711,10 @@ namespace Sentry
public string? Distribution { get; set; }
public string? Dsn { get; set; }
public bool EnableBackpressureHandling { get; set; }
+ public bool EnableLogs { get; set; }
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
@@ -798,14 +798,10 @@ namespace Sentry
public void SetBeforeBreadcrumb(System.Func beforeBreadcrumb) { }
public void SetBeforeSend(System.Func beforeSend) { }
public void SetBeforeSend(System.Func beforeSend) { }
+ public void SetBeforeSendLog(System.Func beforeSendLog) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- public class SentryExperimentalOptions
- {
- public bool EnableLogs { get; set; }
- public void SetBeforeSendLog(System.Func beforeSendLog) { }
- }
}
public sealed class SentryPackage : Sentry.ISentryJsonSerializable
{
diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
index c95975f156..71406a71ac 100644
--- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
+++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
@@ -693,10 +693,10 @@ namespace Sentry
public string? Distribution { get; set; }
public string? Dsn { get; set; }
public bool EnableBackpressureHandling { get; set; }
+ public bool EnableLogs { get; set; }
public bool EnableScopeSync { get; set; }
public bool EnableSpotlight { get; set; }
public string? Environment { get; set; }
- public Sentry.SentryOptions.SentryExperimentalOptions Experimental { get; set; }
public System.Collections.Generic.IList FailedRequestStatusCodes { get; set; }
public System.Collections.Generic.IList FailedRequestTargets { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
@@ -774,14 +774,10 @@ namespace Sentry
public void SetBeforeBreadcrumb(System.Func beforeBreadcrumb) { }
public void SetBeforeSend(System.Func beforeSend) { }
public void SetBeforeSend(System.Func beforeSend) { }
+ public void SetBeforeSendLog(System.Func beforeSendLog) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public void SetBeforeSendTransaction(System.Func beforeSendTransaction) { }
public Sentry.SentryOptions UseStackTraceFactory(Sentry.Extensibility.ISentryStackTraceFactory sentryStackTraceFactory) { }
- public class SentryExperimentalOptions
- {
- public bool EnableLogs { get; set; }
- public void SetBeforeSendLog(System.Func beforeSendLog) { }
- }
}
public sealed class SentryPackage : Sentry.ISentryJsonSerializable
{
diff --git a/test/Sentry.Tests/HubTests.cs b/test/Sentry.Tests/HubTests.cs
index b5d7a43a87..17c3474705 100644
--- a/test/Sentry.Tests/HubTests.cs
+++ b/test/Sentry.Tests/HubTests.cs
@@ -1765,7 +1765,7 @@ public async Task CaptureTransaction_WithTransactionProfiler_SendsTransactionWit
public void Logger_IsDisabled_DoesNotCaptureLog()
{
// Arrange
- Assert.False(_fixture.Options.Experimental.EnableLogs);
+ Assert.False(_fixture.Options.EnableLogs);
var hub = _fixture.GetSut();
// Act
@@ -1785,7 +1785,7 @@ public void Logger_IsDisabled_DoesNotCaptureLog()
public void Logger_IsEnabled_DoesCaptureLog()
{
// Arrange
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var hub = _fixture.GetSut();
// Act
@@ -1805,11 +1805,11 @@ public void Logger_IsEnabled_DoesCaptureLog()
public void Logger_EnableAfterCreate_HasNoEffect()
{
// Arrange
- Assert.False(_fixture.Options.Experimental.EnableLogs);
+ Assert.False(_fixture.Options.EnableLogs);
var hub = _fixture.GetSut();
// Act
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
// Assert
hub.Logger.Should().BeOfType();
@@ -1819,11 +1819,11 @@ public void Logger_EnableAfterCreate_HasNoEffect()
public void Logger_DisableAfterCreate_HasNoEffect()
{
// Arrange
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var hub = _fixture.GetSut();
// Act
- _fixture.Options.Experimental.EnableLogs = false;
+ _fixture.Options.EnableLogs = false;
// Assert
hub.Logger.Should().BeOfType();
@@ -1833,7 +1833,7 @@ public void Logger_DisableAfterCreate_HasNoEffect()
public async Task Logger_FlushAsync_DoesCaptureLog()
{
// Arrange
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var hub = _fixture.GetSut();
// Act
@@ -1858,7 +1858,7 @@ await _fixture.Client.Received(1).FlushAsync(
public void Logger_Dispose_DoesCaptureLog()
{
// Arrange
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var hub = _fixture.GetSut();
// Act
diff --git a/test/Sentry.Tests/SentryStructuredLoggerTests.Format.cs b/test/Sentry.Tests/SentryStructuredLoggerTests.Format.cs
index 87894fed75..31aec367e3 100644
--- a/test/Sentry.Tests/SentryStructuredLoggerTests.Format.cs
+++ b/test/Sentry.Tests/SentryStructuredLoggerTests.Format.cs
@@ -13,7 +13,7 @@ public partial class SentryStructuredLoggerTests
[InlineData(SentryLogLevel.Fatal)]
public void Log_Enabled_CapturesEnvelope(SentryLogLevel level)
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
Envelope envelope = null!;
@@ -35,7 +35,7 @@ public void Log_Enabled_CapturesEnvelope(SentryLogLevel level)
[InlineData(SentryLogLevel.Fatal)]
public void Log_Disabled_DoesNotCaptureEnvelope(SentryLogLevel level)
{
- _fixture.Options.Experimental.EnableLogs.Should().BeFalse();
+ _fixture.Options.EnableLogs.Should().BeFalse();
var logger = _fixture.GetSut();
logger.Log(level, "Template string with arguments: {0}, {1}, {2}, {3}", "string", true, 1, 2.2);
@@ -53,7 +53,7 @@ public void Log_Disabled_DoesNotCaptureEnvelope(SentryLogLevel level)
[InlineData(SentryLogLevel.Fatal)]
public void Log_ConfigureLog_Enabled_CapturesEnvelope(SentryLogLevel level)
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
Envelope envelope = null!;
@@ -75,7 +75,7 @@ public void Log_ConfigureLog_Enabled_CapturesEnvelope(SentryLogLevel level)
[InlineData(SentryLogLevel.Fatal)]
public void Log_ConfigureLog_Disabled_DoesNotCaptureEnvelope(SentryLogLevel level)
{
- _fixture.Options.Experimental.EnableLogs.Should().BeFalse();
+ _fixture.Options.EnableLogs.Should().BeFalse();
var logger = _fixture.GetSut();
logger.Log(level, ConfigureLog, "Template string with arguments: {0}, {1}, {2}, {3}", "string", true, 1, 2.2);
diff --git a/test/Sentry.Tests/SentryStructuredLoggerTests.cs b/test/Sentry.Tests/SentryStructuredLoggerTests.cs
index bee10461ff..b4e9e8c775 100644
--- a/test/Sentry.Tests/SentryStructuredLoggerTests.cs
+++ b/test/Sentry.Tests/SentryStructuredLoggerTests.cs
@@ -76,7 +76,7 @@ public void Dispose()
[Fact]
public void Create_Enabled_NewDefaultInstance()
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var instance = _fixture.GetSut();
var other = _fixture.GetSut();
@@ -88,7 +88,7 @@ public void Create_Enabled_NewDefaultInstance()
[Fact]
public void Create_Disabled_CachedDisabledInstance()
{
- _fixture.Options.Experimental.EnableLogs.Should().BeFalse();
+ _fixture.Options.EnableLogs.Should().BeFalse();
var instance = _fixture.GetSut();
var other = _fixture.GetSut();
@@ -101,7 +101,7 @@ public void Create_Disabled_CachedDisabledInstance()
public void Log_WithoutActiveSpan_CapturesEnvelope()
{
_fixture.WithoutActiveSpan();
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
Envelope envelope = null!;
@@ -120,8 +120,8 @@ public void Log_WithBeforeSendLog_InvokesCallback()
var invocations = 0;
SentryLog configuredLog = null!;
- _fixture.Options.Experimental.EnableLogs = true;
- _fixture.Options.Experimental.SetBeforeSendLog((SentryLog log) =>
+ _fixture.Options.EnableLogs = true;
+ _fixture.Options.SetBeforeSendLog((SentryLog log) =>
{
invocations++;
configuredLog = log;
@@ -142,8 +142,8 @@ public void Log_WhenBeforeSendLogReturnsNull_DoesNotCaptureEnvelope()
{
var invocations = 0;
- _fixture.Options.Experimental.EnableLogs = true;
- _fixture.Options.Experimental.SetBeforeSendLog((SentryLog log) =>
+ _fixture.Options.EnableLogs = true;
+ _fixture.Options.SetBeforeSendLog((SentryLog log) =>
{
invocations++;
return null;
@@ -159,7 +159,7 @@ public void Log_WhenBeforeSendLogReturnsNull_DoesNotCaptureEnvelope()
[Fact]
public void Log_InvalidFormat_DoesNotCaptureEnvelope()
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
logger.LogTrace("Template string with arguments: {0}, {1}, {2}, {3}, {4}", "string", true, 1, 2.2);
@@ -175,7 +175,7 @@ public void Log_InvalidFormat_DoesNotCaptureEnvelope()
[Fact]
public void Log_InvalidConfigureLog_DoesNotCaptureEnvelope()
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
logger.LogTrace(static (SentryLog log) => throw new InvalidOperationException(), "Template string with arguments: {0}, {1}, {2}, {3}", "string", true, 1, 2.2);
@@ -191,8 +191,8 @@ public void Log_InvalidConfigureLog_DoesNotCaptureEnvelope()
[Fact]
public void Log_InvalidBeforeSendLog_DoesNotCaptureEnvelope()
{
- _fixture.Options.Experimental.EnableLogs = true;
- _fixture.Options.Experimental.SetBeforeSendLog(static (SentryLog log) => throw new InvalidOperationException());
+ _fixture.Options.EnableLogs = true;
+ _fixture.Options.SetBeforeSendLog(static (SentryLog log) => throw new InvalidOperationException());
var logger = _fixture.GetSut();
logger.LogTrace("Template string with arguments: {0}, {1}, {2}, {3}", "string", true, 1, 2.2);
@@ -208,7 +208,7 @@ public void Log_InvalidBeforeSendLog_DoesNotCaptureEnvelope()
[Fact]
public void Flush_AfterLog_CapturesEnvelope()
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
Envelope envelope = null!;
@@ -230,7 +230,7 @@ public void Flush_AfterLog_CapturesEnvelope()
[Fact]
public void Dispose_BeforeLog_DoesNotCaptureEnvelope()
{
- _fixture.Options.Experimental.EnableLogs = true;
+ _fixture.Options.EnableLogs = true;
var logger = _fixture.GetSut();
var defaultLogger = logger.Should().BeOfType().Which;