Skip to content

Commit e3b1246

Browse files
authored
ref(logs): Change documentation for logs sentry.origin consolidation (#15127)
This merge aims to consolidate category in `sentry.origin` for Logs. Specifically, I propose we use `auto.log[...]` in `sentry.origin` for logs that are generated in logging libraries.
1 parent be5576a commit e3b1246

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,20 @@ If there are no `sentry.message.parameter.X` attributes included in the log, the
305305

306306
#### SDK Integration Attributes
307307

308-
If a log is generated by an SDK integration, the SDK should also set the `sentry.origin` attribute, as per the [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation. It is assumed that logs without a `sentry.origin` attribute are manually created by the user.
308+
If a log is generated by an SDK integration, the SDK should also set the `sentry.origin` attribute, as per the [Trace Origin](/sdk/telemetry/traces/trace-origin/) documentation.
309309

310-
```json
311-
{
312-
"sentry.origin": "auto.db.graphql"
313-
}
314-
```
310+
Logs can be generated in three ways:
311+
312+
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.
313+
314+
2. Captured from a logging library: Use `auto.log.<name>` format. where `<name>` is the relevant integration. For example, the .NET Serilog library emits:
315+
```json
316+
{ "sentry.origin": "auto.log.serilog" }
317+
```
318+
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.
319+
```json
320+
{ "sentry.origin": "auto.db.prisma" }
321+
```
315322

316323
#### User Attributes
317324

develop-docs/sdk/telemetry/traces/span-operations.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ Messages/Queue spans are expected follow OpenTelemetry's [Messaging](https://git
265265
| graphql | |
266266
| grpc | |
267267
| http | |
268+
| log | |
268269
| mark | |
269270
| measure | |
270271
| middleware | |

0 commit comments

Comments
 (0)