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/spans/implementation.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ If you're implementing Span-First (as a PoC) in your SDK, take an iterative appr
31
31
- This new API MUST only be used in conjunction with the new `traceLifeCycle` option and therefore only emit new spans (no transactions).
32
32
- This new API MUST NOT expose any old transaction properties or concepts like (`op`, `description`, `tags`, etc).
33
33
- TBD: Some SDKs already have `startSpan` or similar APIs. The migration path is still TBD but a decision can be made at a later stage.
34
-
5.Implment the `captureSpan`[single-span processing pipeline](#single-span-processing-pipeline)
34
+
5.Implement the `captureSpan`[single-span processing pipeline](#single-span-processing-pipeline)
35
35
- Either reuse existing heuristics (e.g. flush when segment span ends) or build a simple span buffer to flush spans (e.g. similar to the existing buffers for logs or metrics).
36
36
- Implementing the more complex [Telemetry Buffer](./../telemetry-buffer/index) can happen at a later stage.
37
37
6. Achieve data parity with the existing transaction events.
@@ -57,15 +57,15 @@ Here's a rough overview of what `captureSpan` should do in which order:
57
57
58
58
1. Accept any span that already ended (i.e. has an `end_timestamp`)
59
59
2. Obtain the current, isolation and global scopes and merge the scope data.
60
-
3. Apply [common span attributes](../span-protocol/#common-attribute-keys) from the client and the methed scope data to every span.
60
+
3. Apply [common span attributes](../span-protocol/#common-attribute-keys) from the client and the merged scope data to every span.
61
61
4. Apply the merged scope data (including scope attributes) to the span IFF it is a segment span.
62
62
5. Apply any span processing hooks (i.e. event processor replacements) to the span.
63
63
6. Apply the `before_send_span` callback to the span.
64
64
7. Enqueue the span into the span buffer.
65
65
66
66
The `captureSpan` pipeline MUST NOT
67
67
- drop any span
68
-
- buffer spans before enqueing them
68
+
- buffer spans before enqueuing them
69
69
70
70
### [TMP solution] Span Filtering
71
71
@@ -77,21 +77,21 @@ We might revisit this, which could require changes to the single-span processing
77
77
78
78
For now, this means though:
79
79
- Whenever `ignore_spans` is applied, SDKs MUST NOT start an actual span. Instead, they SHOULD start a No-op ("non-recording") span, which has no influence on the trace hierarchy.
80
-
- SDKS MUST record client outcomes for ingored spans
80
+
- SDKS MUST record client outcomes for ignored spans
81
81
- SDKs MUST apply `ignore_spans` to every span if at all possible (POTel SDKs are excepted, but encouraged to do so as well)
82
82
83
83
### [TBD] Event Processors
84
84
85
85
Given that spans no longer are events (as opposed to transactions), they don't go through our event processors, which are exensively used throughout the SDKs (clients, integrations) but also by users.
86
86
Instead, we need to find another way for users or integrations to enrich and mutate spans.
87
87
88
-
For user-facing migration, we should try to solve every use case with `ingore_spans` (for filtering) and `before_send_span` (for enrichment, data scrubbing and span mutation).
88
+
For user-facing migration, we should try to solve every use case with `ignore_spans` (for filtering) and `before_send_span` (for enrichment, data scrubbing and span mutation).
89
89
90
90
For SDK-internal processing, we're still evaluating the preferred approach but there are two main options:
91
91
92
92
1. Expose new APIs for integrations (and secondarily users) to process a span.
93
93
For example via SDK lifecycle hooks (implemented in the JS SDK).
94
-
Every intergration would have to listen to this hook and apply its logic to spans.
94
+
Every integration would have to listen to this hook and apply its logic to spans.
95
95
SDKs need to add a subscriber to the hook everywhere where they currently add an event processor.
0 commit comments