You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/logs.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -285,6 +285,14 @@ Example:
285
285
}
286
286
```
287
287
288
+
If a log is generated by an SDK integration, the SDK should also set the `sentry.origin` attribute, as per the [Trace Origin](./traces/trace-origin/) documentation. It is assumed that logs without a `sentry.origin` attribute are manually created by the user.
289
+
290
+
```json
291
+
{
292
+
"sentry.origin": "auto.db.graphql"
293
+
}
294
+
```
295
+
288
296
Beyond these attributes, we are exploring if the SDK should also send OS, user, and device information automatically (via reading the appropriate contexts from the scope). Given this behaviour can easily be added as a new feature to the SDK, it does not have to be part of the initial SDK implementation until we make a finalized decision.
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/traces/trace-origin.mdx
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
title: Trace Origin
3
3
---
4
4
5
-
Trace origin indicates what created a traceor a span. Not all traces and spans contain enough information
5
+
Trace origin indicates what created a trace, span or log. Not all traces, spans or logs contain enough information
6
6
to tell whether the user or what precisely in the SDK created it. Origin solves this problem. Origin can be sent with
7
-
the <Linkto="/sdk/data-model/event-payloads/contexts/#trace-context">trace context</Link> or <Linkto="/sdk/data-model/event-payloads/span/">spans</Link>.
8
-
The SDKs should set this value automatically. It is not expected to be set manually by users. The value for origin should rarely change so that we can run proper analytics on them.
7
+
the <Linkto="/sdk/data-model/event-payloads/contexts/#trace-context">trace context</Link>, <Linkto="/sdk/data-model/event-payloads/span/">spans</Link>, or <Linkto="/sdk/telemetry/logs/">logs</Link>.
8
+
9
+
For logs and standalone spans, the origin should be set as the `sentry.origin` attribute key.
9
10
11
+
The SDKs should set this value automatically. It is not expected to be set manually by users. The value for origin should rarely change so that we can run proper analytics on them.
10
12
11
13
The origin is of type `string` and consists of four parts: `<type>.<category>.<integration-name>.<integration-part>`.
12
14
Only the first is mandatory. The parts build upon each other, meaning it is forbidden
@@ -28,12 +30,10 @@ to skip one part. For example, you may send parts one and two but aren't allowed
28
30
29
31
: _Optional_. Is the part of the integration of the SDK that created the trace or span. This is only useful when one integration creates multiple traces or spans, and you'd like to differentiate. Therefore, most of the time, this will be omitted.
30
32
31
-
32
33
All parts can only contain:
33
34
34
-
* Alphanumeric characters: `a-z` , `A-Z` , and `0-9`.
35
-
* Underscores: `_`
36
-
35
+
- Alphanumeric characters: `a-z` , `A-Z` , and `0-9`.
36
+
- Underscores: `_`
37
37
38
38
### Examples
39
39
@@ -53,7 +53,7 @@ All parts can only contain:
53
53
-`auto.db.core_data`
54
54
-`auto.db.graphql`
55
55
56
-
Origins of type `manual` can also have categories and integration names. For example, for the <Linkto="/sdk/performance/time-to-initial-full-display/">time to display feature</Link>, the user manually calls an API of the SDK,
56
+
Origins of type `manual` can also have categories and integration names. For example, for the <Linkto="/sdk/performance/time-to-initial-full-display/">time to display feature</Link>, the user manually calls an API of the SDK,
57
57
creating a span. In this case, the SDK can tell what created the span, but the user did it manually. On the other hand, the SDK also
58
58
automatically creates a span. In this case we end up with the following origins:
59
59
@@ -63,5 +63,8 @@ automatically creates a span. In this case we end up with the following origins:
0 commit comments