Skip to content

Commit 82418d5

Browse files
authored
docs(dotnet/logs): .NET APIs are now stable (#15469)
1 parent 6d40c56 commit 82418d5

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

platform-includes/logs/options/dotnet.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#### Experimental.EnableLogs
1+
#### EnableLogs
22

33
<PlatformSection notSupported={["dotnet.aspnetcore", "dotnet.azure-functions-worker", "dotnet.blazor-webassembly", "dotnet.extensions-logging", "dotnet.maui", "dotnet.serilog"]}>
44
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<TCateg
1212
Set to `true` in order to enable the logging integration via the `Log`/`Logger` APIs.
1313
</PlatformSection>
1414

15-
#### Experimental.SetBeforeSendLog
15+
#### SetBeforeSendLog
1616

17-
To filter logs, or update them before they are sent to Sentry, you can use the `Experimental.SetBeforeSendLog(Func<SentryLog, SentryLog?>)` option.
17+
To filter logs, or update them before they are sent to Sentry, you can use the `SetBeforeSendLog(Func<SentryLog, SentryLog?>)` option.
1818

1919
```csharp
2020
options =>
2121
{
2222
options.Dsn = "___PUBLIC_DSN___";
23-
options.Experimental.EnableLogs = true;
23+
options.EnableLogs = true;
2424
// a callback that is invoked before sending a log to Sentry
25-
options.Experimental.SetBeforeSendLog(static log =>
25+
options.SetBeforeSendLog(static log =>
2626
{
2727
// filter out all info logs
2828
if (log.Level is SentryLogLevel.Info)
@@ -44,7 +44,7 @@ options =>
4444
});
4545
```
4646

47-
The callback function set via `Experimental.SetBeforeSendLog(Func<SentryLog, SentryLog?>)` 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.
47+
The callback function set via `SetBeforeSendLog(Func<SentryLog, SentryLog?>)` 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.
4848

4949
The log object of type `SentryLog` has the following members:
5050
- `Timestamp` Property: (`DateTimeOffset`) The timestamp of the log.

platform-includes/logs/setup/dotnet.mdx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
To enable logging, you need to initialize the SDK with the `Experimental.EnableLogs` option set to `true`.
1+
To enable logging, you need to initialize the SDK with the `EnableLogs` option set to `true`.
22

33
<PlatformSection notSupported={["dotnet.aspnetcore", "dotnet.aws-lambda", "dotnet.azure-functions-worker", "dotnet.blazor-webassembly", "dotnet.extensions-logging", "dotnet.maui", "dotnet.serilog"]}>
44

@@ -7,7 +7,7 @@ SentrySdk.Init(options =>
77
{
88
options.Dsn = "___PUBLIC_DSN___";
99
// Enable logs to be sent to Sentry
10-
options.Experimental.EnableLogs = true;
10+
options.EnableLogs = true;
1111
});
1212
```
1313

@@ -20,7 +20,7 @@ SentrySdk.Init(options =>
2020
{
2121
options.Dsn = "___PUBLIC_DSN___";
2222
// Enable logs to be sent to Sentry
23-
options.Experimental.EnableLogs = true;
23+
options.EnableLogs = true;
2424
});
2525
```
2626

@@ -33,7 +33,7 @@ SentrySdk.Init(options =>
3333
{
3434
options.Dsn = "___PUBLIC_DSN___";
3535
// Enable logs to be sent to Sentry
36-
options.Experimental.EnableLogs = true;
36+
options.EnableLogs = true;
3737
});
3838
```
3939

@@ -45,9 +45,7 @@ SentrySdk.Init(options =>
4545
{
4646
"Sentry": {
4747
"Dsn": "___PUBLIC_DSN___",
48-
"Experimental": {
49-
"EnableLogs": true
50-
}
48+
"EnableLogs": true
5149
}
5250
}
5351
```
@@ -61,7 +59,7 @@ SentrySdk.Init(options =>
6159
{
6260
options.Dsn = "___PUBLIC_DSN___";
6361
// Enable logs to be sent to Sentry
64-
options.Experimental.EnableLogs = true;
62+
options.EnableLogs = true;
6563
});
6664
```
6765

platform-includes/logs/usage/dotnet.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ SentrySdk.Logger.LogInfo("A simple log message");
1111
SentrySdk.Logger.LogError("A {0} log message", "formatted");
1212
```
1313

14-
<Alert title="Note">
15-
During the experimental phase of the feature, we will provide more method overloads for convenient invocation in common scenarios.
16-
Additionally, we may provide method overloads that are not based on _composite format strings_, but on _interpolated strings_.
17-
</Alert>
18-
1914
</PlatformSection>
2015

2116
<PlatformSection supported={["dotnet.aspnetcore", "dotnet.azure-functions-worker", "dotnet.blazor-webassembly", "dotnet.extensions-logging", "dotnet.maui"]}>

0 commit comments

Comments
 (0)