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
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ It consists of the following fields:
75
75
76
76
`trace_id`
77
77
78
-
: **String, required**. The trace id of the log.
78
+
: **String, required**. The trace id of the log. The value should be 16 random bytes encoded as a hex string (32 characters long). The trace id should be grabbed from the current propagation context in the SDK.
79
79
80
80
`level`
81
81
@@ -258,8 +258,6 @@ It's important to note that putting everything immediately on a background threa
258
258
259
259
## SDK Behavior
260
260
261
-
The internal SDK implementation is kept purposefully broad as we are still in early stages. As we figure more out about the logs product and payload characteristics, we'll be able to define a more rigorous spec for logging internals in the SDK. SDKs should take care to not expose logging internals as much as possible to userland so that they can be refactored in the future.
262
-
263
261
In general log processing should follow this order:
264
262
265
263
1. Capture log via [Public APIs](#logger-module) (e.g. `Sentry.logger.info`) or via [SDK integrations](#sdk-integrations).
@@ -269,6 +267,12 @@ In general log processing should follow this order:
269
267
1. Add log to buffer/batch processor as detailed in [buffering](#buffering).
270
268
1. At time of flushing buffer, send array of logs to Sentry via `log` envelope, apply rate limiting as per [data category and rate limiting](#data-category-and-rate-limiting).
271
269
270
+
<Alerttitle="Note"level="warning">
271
+
272
+
An SDK should implement [Tracing without Performance](/sdk/telemetry/traces/tracing-without-performance) before adding support for logs. This is required to ensure that logs are associated with traces and that the correct trace context is sent to Sentry.
273
+
274
+
</Alert>
275
+
272
276
### Default Attributes
273
277
274
278
By default the SDK should set the following attributes:
0 commit comments