Skip to content

Commit 4ba2704

Browse files
authored
ref(span-first): Clarify application of scope data to spans (#15773)
Clarifies which spans get which data from the scopes: - scope attributes are applied to all spans - scope contexts and request data is only applied to segment span
1 parent aa8f26c commit 4ba2704

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

develop-docs/sdk/telemetry/spans/implementation.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ Here's a rough overview of what `captureSpan` should do in which order:
7676
1. Accept any span that already ended (i.e. has an `end_timestamp`)
7777
2. Obtain the current, isolation and global scopes and merge the scope data.
7878
3. Apply [common span attributes](../span-protocol/#common-attribute-keys) from the client and the merged scope data to every span.
79-
4. Apply the merged scope data (including scope attributes) to the span IFF it is a segment span.
80-
5. Apply any span processing hooks (i.e. event processor replacements) to the span.
81-
6. Apply the `before_send_span` callback to the span.
82-
7. Enqueue the span into the span buffer.
79+
4. Apply [scope attributes](../../scopes/#setting-attributes) from the merged scope data to every span.
80+
5. Apply `contexts` and `request` data from the merged scopes to the segment span only.
81+
6. Apply any span processing hooks (i.e. event processor replacements) to the span.
82+
7. Apply the `before_send_span` callback to the span.
83+
8. Enqueue the span into the span buffer.
8384

8485
The `captureSpan` pipeline MUST NOT
8586
- drop any span

0 commit comments

Comments
 (0)