Commit 8bb1825
fix(aws-durable-execution-sdk-js): [SVLS-8588] set span type to serverless (#9162)
* fix(aws-durable-execution-sdk-js): treat FAILED checkpoints as replays
A durable operation served from a FAILED checkpoint on replay (the SDK
re-raises the stored error without running the body) was not recognized as a
replay: both `aws.durable.replayed` and the `aws.durable.operation_attempt`
normalization keyed only on `Status === 'SUCCEEDED'`.
As a result a caught-then-replayed failed operation reported
`replayed=false` and a 1-indexed `operation_attempt` (e.g. 2 for a step whose
2nd attempt failed) — one higher than, and inconsistent with, the live final
attempt (1). This is the same off-by-one #8595 fixed for SUCCEEDED, still open
for FAILED.
Treat a terminal checkpoint (SUCCEEDED or FAILED) as a replay for both tags, so
the replay agrees with the live run (replayed=true, operation_attempt=1).
Verified in production on a durable Lambda.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(aws-durable-execution-sdk-js): set span type to serverless
The durable plugins declare `static type = 'serverless'`, but
`TracingPlugin.startSpan` only defaults `component` from the class —
`type` and `kind` have no `this.constructor.*` fallback. The plugins
forwarded `kind: this.constructor.kind` but omitted `type`, so every
durable span was emitted with an empty `span.type`.
Forward `type: this.constructor.type` in both bindStart calls so the
spans carry `type: serverless`, matching the dd-trace-py integration.
This lets serverless UIs (e.g. the Lambda trace panel's Durable
Function Execution section) recognize the spans as Lambda/function
spans.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent f0bc9f1 commit 8bb1825
3 files changed
Lines changed: 13 additions & 0 deletions
File tree
- packages/datadog-plugin-aws-durable-execution-sdk-js
- src
- test
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
222 | 233 | | |
223 | 234 | | |
224 | 235 | | |
| |||
0 commit comments