Skip to content

Commit 5c1b94f

Browse files
docs(dotnet): update logs docs to .NET SDK v6 (#16055)
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
1 parent d479dd6 commit 5c1b94f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

platform-includes/logs/options/dotnet.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ options =>
4444
});
4545
```
4646

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.
47+
The `beforeSendLog` delegate 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.
@@ -53,6 +53,6 @@ The log object of type `SentryLog` has the following members:
5353
- `Message` Property: (`string`) The formatted log message.
5454
- `Template` Property: (`string?`) The parameterized template string.
5555
- `Parameters` Property: (`ImmutableArray<KeyValuePair<string, object>>`) The parameters to the template string.
56-
- `ParentSpanId` Property: (`SpanId?`) The span id of the span that was active when the log was collected.
56+
- `SpanId` Property: (`SpanId?`) The span id of the span that was active when the log was collected.
5757
- `TryGetAttribute(string key, out object value)` Method: Gets the attribute value associated with the specified key. Returns `true` if the log contains an attribute with the specified key and it's value is not `null`, otherwise `false`.
5858
- `SetAttribute(string key, object value)` Method: Sets a key-value pair of data attached to the log. Supported types are `string`, `bool`, integers up to a size of 64-bit signed, and floating-point numbers up to a size of 64-bit.

platform-includes/logs/usage/dotnet.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the `SentrySdk.Logger` APIs.
44

5-
The `SentrySdk.Logger` instance exposes six methods that you can use to log messages at different log levels: `Trace`, `Debug`, `Info`, `Warning`, `Error`, and `Fatal`.
5+
The `SentryStructuredLogger` type exposes six method groups that you can use to log messages at different log levels: `Trace`, `Debug`, `Info`, `Warning`, `Error`, and `Fatal`.
66

77
These properties will be sent to Sentry, and can be searched from within the Logs UI, and even added to the Logs views as a dedicated column.
88

0 commit comments

Comments
 (0)