Skip to content

Commit b479529

Browse files
authored
feat(logs): Add note about tracing without performance (#13641)
1 parent c77a932 commit b479529

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ It consists of the following fields:
7575

7676
`trace_id`
7777

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

8080
`level`
8181

@@ -258,8 +258,6 @@ It's important to note that putting everything immediately on a background threa
258258

259259
## SDK Behavior
260260

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-
263261
In general log processing should follow this order:
264262

265263
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:
269267
1. Add log to buffer/batch processor as detailed in [buffering](#buffering).
270268
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).
271269

270+
<Alert title="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+
272276
### Default Attributes
273277

274278
By default the SDK should set the following attributes:

0 commit comments

Comments
 (0)