feat: [SVLS-9168] add aws.durable.operation_attempt tag to durable operation spans #8595
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 595 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.382
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8595"
general
weight: 0.35
crysmags
What does this PR do?
Adds
aws.durable.operation_attempt(numeric metric) toaws.durable.stepandaws.durable.wait_for_conditionspans. The value is 0-indexed — the number of prior failed attempts:0— original attempt1— first retry2— second retrySourced from the Durable Execution SDK's
StepDetails.Attemptfield on the checkpoint, passed through as-is. When no checkpoint exists yet (the very first execution before any prior failures), the tag defaults to0.Motivation
Mirrors dd-trace-py #18191 and #18520 so the JS tracer surfaces the same retry-attempt signal.
Why only
stepandwait_for_conditionspans?The SDK has six durable operations; only two use the
StepDetails.Attemptretry mechanism:| Operation | Detail field on checkpoint | Has retry? |
|---|---|---|
|
step|StepDetails| yes ||
waitForCondition|StepDetails(polling iterations) | yes ||
createCallback|CallbackDetails| no ||
invoke|ChainedInvokeDetails| no ||
runInChildContext| — | no ||
wait|WaitDetails| no |waitForCallbackisn't its own retryable operation — it internally callscreateCallback+step, so any retries appear on the inneraws.durable.stepchild span (already covered).mapandparalleldecompose into MapIteration / ParallelBranch child operations, which therunInChildContextsuppression filter already strips.Additional Notes
Stacked on #8012 (Joey's aws-durable-execution-sdk-js instrumentation). Once that merges, retarget to
master.Testing
Installed the tracer on a Lambda durable function. The function has a step
step-1which fails twice then succeeds.Original attempt:
aws.durable.operation_attemptis 0 (link)<img width="474" height="428" alt="image" src="https://github.com/user-attachments/assets/77abbabb-e7c8-4beb-bd2e-092a3f229e7a" />
2nd attempt (1st retry):
aws.durable.operation_attemptis 1 (link)<img width="317" height="203" alt="image" src="https://github.com/user-attachments/assets/f38677b5-e9f4-43bd-85a1-f7d608a07a78" />
3nd attempt (2nd retry):
aws.durable.operation_attemptis 2 (link)<img width="304" height="205" alt="image" src="https://github.com/user-attachments/assets/53868429-f796-45e4-95a4-e89562aebb54" />