Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform-includes/logs/options/dotnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ options =>
});
```

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.
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.

The log object of type `SentryLog` has the following members:
- `Timestamp` Property: (`DateTimeOffset`) The timestamp of the log.
Expand All @@ -53,6 +53,6 @@ The log object of type `SentryLog` has the following members:
- `Message` Property: (`string`) The formatted log message.
- `Template` Property: (`string?`) The parameterized template string.
- `Parameters` Property: (`ImmutableArray<KeyValuePair<string, object>>`) The parameters to the template string.
- `ParentSpanId` Property: (`SpanId?`) The span id of the span that was active when the log was collected.
- `SpanId` Property: (`SpanId?`) The span id of the span that was active when the log was collected.
- `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`.
- `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.
2 changes: 1 addition & 1 deletion platform-includes/logs/usage/dotnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

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`.
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`.

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.

Expand Down