Skip to content
Merged
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
17 changes: 10 additions & 7 deletions develop-docs/sdk/telemetry/logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ By default the SDK should attach the following attributes to a log:
}
```

If the log was paramaterized the SDK should attach the following
If the log was parameterized the SDK should attach the following

1. `sentry.message.template`: The parameterized template string
2. `sentry.message.parameter.X`: The parameters to the template string. X can either be the number that represent the parameter's position in the template string (`sentry.message.parameter.0`, `sentry.message.parameter.1`, etc) or the parameter's name (`sentry.message.parameter.item_id`, `sentry.message.parameter.user_id`, etc)
Expand All @@ -312,13 +312,16 @@ Logs can be generated in three ways:
1. User calls Sentry’s Logging API directly: SDKs MUST NOT send a `sentry.origin`. As logs are charged based on size, we want to minimize the size of logs, and we **intentionally deviate** from the original [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation.

2. Captured from a logging library: Use `auto.log.<name>` format. where `<name>` is the relevant integration. For example, the .NET Serilog library emits:
```json
{ "sentry.origin": "auto.log.serilog" }
```

```json
{ "sentry.origin": "auto.log.serilog" }
```

3. Auto-emitted logs from other instrumented systems: Use the `auto.<category>.<integration-name>` format as outlined in [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation.
```json
{ "sentry.origin": "auto.db.prisma" }
```

```json
{ "sentry.origin": "auto.db.prisma" }
```

#### User Attributes

Expand Down
2 changes: 1 addition & 1 deletion includes/logs/default-attributes/message-template.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Message Template Attributes

If the log was paramaterized, Sentry adds the message template and parameters as log attributes.
If the log was parameterized, Sentry adds the message template and parameters as log attributes.

- `message.template`: The parameterized template string. This is sent from the SDK as `sentry.message.template`.
- `message.parameter.X`: The parameters to fill the template string. X can either be the number that represent the parameter's position in the template string (`sentry.message.parameter.0`, `sentry.message.parameter.1`, etc) or the parameter's name (`sentry.message.parameter.item_id`, `sentry.message.parameter.user_id`, etc). This is sent from the SDK as `sentry.message.parameter.X`.
2 changes: 1 addition & 1 deletion includes/logs/default-attributes/mobile-desktop-native.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### Message Template Attributes

If the log was paramaterized (like with `Sentry.logger().error("A %s log message", "formatted");`), Sentry adds the message template and parameters as log attributes.
If the log was parameterized (like with `Sentry.logger().error("A %s log message", "formatted");`), Sentry adds the message template and parameters as log attributes.
Loading