From a94f8bda0f5f8855ca570f997654bb0763f46438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20P=C3=B6lz?= <38893694+Flash0ver@users.noreply.github.com> Date: Tue, 11 Nov 2025 15:55:29 +0100 Subject: [PATCH] docs(dotnet/logs): .NET APIs are now stable --- platform-includes/logs/options/dotnet.mdx | 12 ++++++------ platform-includes/logs/setup/dotnet.mdx | 14 ++++++-------- platform-includes/logs/usage/dotnet.mdx | 5 ----- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/platform-includes/logs/options/dotnet.mdx b/platform-includes/logs/options/dotnet.mdx index ab726ffe4f38f7..d3a073f9bf2e3a 100644 --- a/platform-includes/logs/options/dotnet.mdx +++ b/platform-includes/logs/options/dotnet.mdx @@ -1,4 +1,4 @@ -#### Experimental.EnableLogs +#### EnableLogs Set to `true` in order to enable the `SentrySdk.Logger` APIs. @@ -12,17 +12,17 @@ Set to `true` in order to enable the logging integration via the `ILogger -#### Experimental.SetBeforeSendLog +#### SetBeforeSendLog -To filter logs, or update them before they are sent to Sentry, you can use the `Experimental.SetBeforeSendLog(Func)` option. +To filter logs, or update them before they are sent to Sentry, you can use the `SetBeforeSendLog(Func)` option. ```csharp options => { options.Dsn = "___PUBLIC_DSN___"; - options.Experimental.EnableLogs = true; + options.EnableLogs = true; // a callback that is invoked before sending a log to Sentry - options.Experimental.SetBeforeSendLog(static log => + options.SetBeforeSendLog(static log => { // filter out all info logs if (log.Level is SentryLogLevel.Info) @@ -44,7 +44,7 @@ options => }); ``` -The callback function set via `Experimental.SetBeforeSendLog(Func)` receives a log object, and should return the log object if you want it to be sent to Sentry, or `null` if you want to discard it. +The callback function set via `SetBeforeSendLog(Func)` receives a log object, and should return the log object if you want it to be sent to Sentry, or `null` if you want to discard it. The log object of type `SentryLog` has the following members: - `Timestamp` Property: (`DateTimeOffset`) The timestamp of the log. diff --git a/platform-includes/logs/setup/dotnet.mdx b/platform-includes/logs/setup/dotnet.mdx index 29da2b2c311d4a..dc614c6db66d9e 100644 --- a/platform-includes/logs/setup/dotnet.mdx +++ b/platform-includes/logs/setup/dotnet.mdx @@ -1,4 +1,4 @@ -To enable logging, you need to initialize the SDK with the `Experimental.EnableLogs` option set to `true`. +To enable logging, you need to initialize the SDK with the `EnableLogs` option set to `true`. @@ -7,7 +7,7 @@ SentrySdk.Init(options => { options.Dsn = "___PUBLIC_DSN___"; // Enable logs to be sent to Sentry - options.Experimental.EnableLogs = true; + options.EnableLogs = true; }); ``` @@ -20,7 +20,7 @@ SentrySdk.Init(options => { options.Dsn = "___PUBLIC_DSN___"; // Enable logs to be sent to Sentry - options.Experimental.EnableLogs = true; + options.EnableLogs = true; }); ``` @@ -33,7 +33,7 @@ SentrySdk.Init(options => { options.Dsn = "___PUBLIC_DSN___"; // Enable logs to be sent to Sentry - options.Experimental.EnableLogs = true; + options.EnableLogs = true; }); ``` @@ -45,9 +45,7 @@ SentrySdk.Init(options => { "Sentry": { "Dsn": "___PUBLIC_DSN___", - "Experimental": { - "EnableLogs": true - } + "EnableLogs": true } } ``` @@ -61,7 +59,7 @@ SentrySdk.Init(options => { options.Dsn = "___PUBLIC_DSN___"; // Enable logs to be sent to Sentry - options.Experimental.EnableLogs = true; + options.EnableLogs = true; }); ``` diff --git a/platform-includes/logs/usage/dotnet.mdx b/platform-includes/logs/usage/dotnet.mdx index 6eb0bcaf692ec3..7caba0799c3500 100644 --- a/platform-includes/logs/usage/dotnet.mdx +++ b/platform-includes/logs/usage/dotnet.mdx @@ -11,11 +11,6 @@ SentrySdk.Logger.LogInfo("A simple log message"); SentrySdk.Logger.LogError("A {0} log message", "formatted"); ``` - -During the experimental phase of the feature, we will provide more method overloads for convenient invocation in common scenarios. -Additionally, we may provide method overloads that are not based on _composite format strings_, but on _interpolated strings_. - -