New Integration. aws-durable-execution-sdk-js.#8012
New Integration. aws-durable-execution-sdk-js.#8012joeyzhao2018 wants to merge 23 commits intomasterfrom
Conversation
…-execution-sdk-js/20260410-013300
Overall package sizeSelf size: 5.51 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: ./.github/actions/plugins/test-and-upstream | ||
|
|
||
| aws-durable-execution-sdk-js: |
There was a problem hiding this comment.
This is for tests added in datadog-plugin-aws-durable-execution-sdk-js/test
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8012 +/- ##
==========================================
- Coverage 73.59% 68.59% -5.01%
==========================================
Files 773 682 -91
Lines 36088 31349 -4739
==========================================
- Hits 26560 21503 -5057
- Misses 9528 9846 +318
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✨ Fix all issues with BitsAI or with Cursor
|
BenchmarksBenchmark execution time: 2026-04-17 14:59:15 Comparing candidate commit 6222c9b in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 1374 metrics, 109 unstable metrics. scenario:spans-finish-immediately-20
|
Note: This PR is based on this apm-ai-toolkit generated PR
Summary
Adds automatic instrumentation for the @aws/durable-execution-sdk-js library, tracing durable workflow executions and all
DurableContextImpl operations. Naming conventions are aligned with the Python (dd-trace-py) counterpart.
Traced Operations
The plugin is a CompositePlugin with server, client, and internal sub-plugins, communicating via diagnostics_channel prefixes set by the
orchestrion rewriter:
Key Features
Resource Name Extraction
All plugins extract a human-readable resource name from ctx.arguments:
operation name (used as resource) and args[1] is the function identifier. Otherwise args[0] is the function identifier.
Peer Service Support
The client plugin (invoke) sets functionname as a tag and declares it as a peerServicePrecursor. When spanComputePeerService is enabled,
peer.service is derived from the target function ARN/name, giving downstream dependency visibility in APM.
Service Name
Default service: aws.durable_execution. Overridable via DD_DURABLE_EXECUTION_SERVICE environment variable (shared with the Python
integration).
Span Lifecycle
All plugins implement both asyncEnd and end to call finish(), ensuring the span is closed regardless of how the tracingChannel fires (sync
vs async completion).
Internal Plugin Architecture
internal.js uses a base class (BaseAwsDurableExecutionSdkJsInternalPlugin) with shared bindStart, getOperationName, getTags, and lifecycle
methods. The 7 operation-specific subclasses only override static prefix (diagnostics channel) and static spanName. This keeps the code DRY
while allowing each operation to be independently subscribed to its own channel.
Plugin Structure
packages/datadog-plugin-aws-durable-execution-sdk-js/
├── src/
│ ├── index.js # CompositePlugin registering server + client + internal plugins
│ ├── server.js # withDurableExecution (server span)
│ ├── client.js # DurableContextImpl.invoke (client span, peer service)
│ └── internal.js # Base class + 7 subclasses for all other operations
└── test/
├── test-setup.js # Mock clients, event builders, operation invokers
└── index.spec.js # Integration tests via createIntegrationTestSuite
Test Coverage
Tests use createIntegrationTestSuite with a mock agent. Each operation has happy-path and error-path tests:
is enabled
Test Plan
Tests in datadog-plugin-aws-durable-execution-sdk-js/test
No Lambda required. These tests run entirely in-process with mocks.
The TestSetup class creates a fully mocked SDK environment:
Uses createIntegrationTestSuite which starts dd-trace with a local test agent (not a real Datadog backend). For each DurableContext operation it tests
withDurableExecution (workflow.execute), step, invoke, runInChildContext, wait, waitForCondition, waitForCallback, createCallback, map, parallel — plus a peer.service test for invoke.