Uh oh!
There was an error while loading. Please reload this page.
[SVLS-8583] Add execution_status tag to aws.lambda span for durable functions - #764
Conversation
…able functions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds durable-function execution status tagging to the aws.lambda span so downstream trace analysis can distinguish outcomes of durable function invocations.
Changes:
- Add
aws_lambda.durable_function.execution_statustag extraction based onresult.Statusfor durable events. - Introduce
extractDurableExecutionStatushelper with validation of allowed status values. - Add unit tests for
extractDurableExecutionStatus.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/trace/listener.ts | Sets the new durable execution status tag on the active aws.lambda span during invocation teardown. |
| src/trace/durable-function-context.ts | Adds validated extraction of durable execution status from handler result. |
| src/trace/durable-function-context.spec.ts | Adds test coverage for the new status-extraction helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…Status enum Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use typeof string guard in extractDurableExecutionStatus for consistency - Move execution_status tagging outside durableFunctionContext block so it applies even when ARN parsing fails - Add listener.spec.ts tests for execution_status tag being set and not set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
litianningdatadog
left a comment
There was a problem hiding this comment.
Stamped. Please watch out the e2e failure
lym953
commented
Apr 16, 2026
E2E test deployment keeps failing with error |
Summary
aws_lambda.durable_function.execution_statustag to theaws.lambdaspan for durable function invocationsresult.Statusin the handler response; valid values areSUCCEEDED,FAILED,PENDING(matching theInvocationStatusenum in the durable execution SDK)DurableExecutionArn, independent of whether ARN parsing succeedsAutomated testing
extractDurableExecutionStatusindurable-function-context.spec.tscovering all valid statuses, invalid status, missing status, null result, and non-durable eventslistener.spec.tsto verify the status tag is set whenresult.Statusis valid and not set otherwiseManual testing
Tested with a durable function which has 2 invocations in an execution.
The
aws.lambdaspan for the 1st invocation has tagexecution_status:PENDING(link)For the 2nd invocation, the tag is
execution_status:FAILED(link) orexecution_status:SUCCEEDED(link)Note
Before an execution finishes (either fails or succeeds), the status is shown as RUNNING, even if the execution is paused. I'm planning to do the same on our UI, so the
PENDINGstatus won't be used, but still adding it as a tag because it's also informative as a tag itself.Next steps
🤖 Generated with Claude Code