Skip to content

feat(aws): aws-durable-execution-sdk-js instrumentation#8012

Merged
pablomartinezbernardo merged 64 commits into
masterfrom
joey/apm-ai-toolkit/aws-durable-execution-sdk-js
Jun 16, 2026
Merged

feat(aws): aws-durable-execution-sdk-js instrumentation#8012
pablomartinezbernardo merged 64 commits into
masterfrom
joey/apm-ai-toolkit/aws-durable-execution-sdk-js

Conversation

@joeyzhao2018

@joeyzhao2018 joeyzhao2018 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds automatic instrumentation for the @aws/durable-execution-sdk-js library.

Traced Operations

Target Span Name Kind
withDurableExecution() wrapper aws.durable.execute internal
DurableContext.step() aws.durable.step internal
DurableContext.invoke() aws.durable.invoke client
DurableContext.wait() aws.durable.wait internal
DurableContext.waitForCondition() aws.durable.wait_for_condition internal
DurableContext.waitForCallback() aws.durable.wait_for_callback internal
DurableContext.createCallback() aws.durable.create_callback internal
DurableContext.map() aws.durable.map internal
DurableContext.parallel() aws.durable.parallel internal
DurableContext.runInChildContext() aws.durable.child_context internal

Implementation Notes

Lazy DurablePromise observation

DurableContext methods return DurablePromise instances that delay the actual execution until user code first awaits/chains them. The integration uses kind: 'Sync' and an observeDurablePromise helper that wraps then/catch/finally. The actual span-finishing chain only attaches after user code first awaits.

Suspended (PENDING) workflows

When execution is suspended, and the SDK intentionally leaves the suspended operation's DurablePromise neither resolved nor rejected. So the handler plugin detects PENDING and finishes any still-open child spans owned by this integration before returning, so the trace processor can flush the partial trace.

Checkpoint-driven retry finalization

On a step retry, the SDK doesn't reject the step's DurablePromise, it suspends execution and writes a checkpoint with Action: 'RETRY'. The CheckpointManager.checkpoint hook detects that, stamps error.{type,message,stack} on the still-open span using the checkpoint's error payload, and finishes the span on asyncEnd.

map/parallel resource cardinality + child_context suppression

For map() / parallel() / waitForCallback() the SDK calls runInChildContext with internal subTypes (Map, Parallel, MapIteration, ParallelBranch, WaitForCallback). Those internal spans are suppressed. Resource is also removed from direct step children of aws.durable.map/aws.durable.parallel to avoid unbounded resource cardinality from per-iteration operation names.

@joeyzhao2018 joeyzhao2018 changed the title Joey/apm ai toolkit/aws durable execution sdk js New Integration. aws-durable-execution-sdk-js. Apr 15, 2026
@github-actions

github-actions Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.24 MB
Deduped: 7.28 MB
No deduping: 7.28 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.2 | 85.93 kB | 825.11 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

Comment thread .github/workflows/apm-integrations.yml Outdated
@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.69%. Comparing base (e338419) to head (bc54581).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...-plugin-aws-durable-execution-sdk-js/src/client.js 93.10% 2 Missing ⚠️
...plugin-aws-durable-execution-sdk-js/src/context.js 96.00% 2 Missing ⚠️
...og-plugin-aws-durable-execution-sdk-js/src/util.js 87.50% 2 Missing ⚠️
...-trace/src/service-naming/schemas/v1/serverless.js 0.00% 2 Missing ⚠️
...s-durable-execution-sdk-js/src/trace-checkpoint.js 98.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8012       +/-   ##
===========================================
+ Coverage   18.52%   92.69%   +74.16%     
===========================================
  Files         305      876      +571     
  Lines       21637    50115    +28478     
  Branches     4867     9831     +4964     
===========================================
+ Hits         4009    46455    +42446     
+ Misses      17628     3660    -13968     
Flag Coverage Δ
aiguard-integration-active 41.46% <66.66%> (?)
aiguard-integration-latest 41.48% <66.66%> (?)
aiguard-integration-maintenance 41.56% <66.66%> (?)
aiguard-macos 34.60% <66.66%> (?)
aiguard-ubuntu 34.75% <66.66%> (?)
aiguard-windows 34.43% <66.66%> (?)
apm-capabilities-tracing-macos 47.89% <23.57%> (?)
apm-capabilities-tracing-ubuntu-active 47.88% <23.57%> (?)
apm-capabilities-tracing-ubuntu-latest 47.88% <23.57%> (?)
apm-capabilities-tracing-ubuntu-maintenance 47.93% <23.57%> (?)
apm-capabilities-tracing-ubuntu-oldest 48.12% <23.57%> (?)
apm-integrations-aerospike-18-gte.5.2.0 33.03% <57.14%> (?)
apm-integrations-aerospike-20-gte.5.5.0 33.05% <57.14%> (?)
apm-integrations-aerospike-22-gte.5.12.1 33.06% <57.14%> (?)
apm-integrations-aerospike-22-gte.6.0.0 33.06% <57.14%> (?)
apm-integrations-aerospike-eol- 32.96% <57.14%> (?)
apm-integrations-confluentinc-kafka-javascript-18 40.05% <66.66%> (?)
apm-integrations-confluentinc-kafka-javascript-20 40.06% <66.66%> (?)
apm-integrations-confluentinc-kafka-javascript-22 40.07% <66.66%> (?)
apm-integrations-confluentinc-kafka-javascript-24 39.96% <66.66%> (?)
apm-integrations-couchbase-18 33.21% <57.14%> (?)
apm-integrations-couchbase-eol 33.09% <57.14%> (?)
apm-integrations-dns 32.98% <66.66%> (?)
apm-integrations-elasticsearch 34.00% <57.14%> (?)
apm-integrations-http-latest 41.20% <57.14%> (?)
apm-integrations-http-maintenance 41.29% <57.14%> (?)
apm-integrations-http-oldest 41.23% <57.14%> (?)
apm-integrations-http2 38.34% <57.14%> (?)
apm-integrations-kafkajs-latest 40.05% <57.14%> (?)
apm-integrations-kafkajs-oldest 40.24% <57.14%> (?)
apm-integrations-net 33.67% <66.66%> (?)
apm-integrations-next-11.1.4 36.64% <80.00%> (?)
apm-integrations-next-12.3.7 36.64% <80.00%> (?)
apm-integrations-next-13.0.0 29.04% <57.14%> (?)
apm-integrations-next-13.2.0 29.00% <57.14%> (?)
apm-integrations-next-13.5.11 29.14% <57.14%> (?)
apm-integrations-next-14.0.0 29.06% <57.14%> (?)
apm-integrations-next-14.2.35 29.06% <57.14%> (?)
apm-integrations-next-14.2.6 29.06% <57.14%> (?)
apm-integrations-next-14.2.7 29.10% <57.14%> (?)
apm-integrations-next-15.0.0 29.06% <57.14%> (?)
apm-integrations-next-15.4.0 29.14% <57.14%> (?)
apm-integrations-next-latest 29.21% <57.14%> (?)
apm-integrations-oracledb 33.88% <57.14%> (?)
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 34.76% <66.66%> (?)
apm-integrations-restify 35.08% <66.66%> (?)
apm-integrations-sharedb 32.38% <66.66%> (?)
apm-integrations-tedious 33.30% <57.14%> (?)
appsec-express 51.02% <66.66%> (?)
appsec-fastify 47.79% <66.66%> (?)
appsec-graphql 47.78% <66.66%> (?)
appsec-integration-active 36.14% <44.26%> (?)
appsec-integration-latest 36.14% <44.26%> (?)
appsec-integration-maintenance 36.20% <44.26%> (?)
appsec-integration-oldest 36.20% <44.26%> (?)
appsec-kafka 40.25% <66.66%> (?)
appsec-ldapjs 39.79% <66.66%> (?)
appsec-lodash 39.71% <66.66%> (?)
appsec-macos 57.09% <66.66%> (?)
appsec-mongodb-core 43.89% <66.66%> (?)
appsec-mongoose 44.74% <66.66%> (?)
appsec-mysql 47.05% <66.66%> (?)
appsec-next-latest-11.1.4 27.28% <66.66%> (?)
appsec-next-latest-12.3.7 27.70% <80.00%> (?)
appsec-next-latest-13.0.0 29.08% <66.66%> (?)
appsec-next-latest-13.2.0 29.10% <66.66%> (?)
appsec-next-latest-13.5.11 29.20% <66.66%> (?)
appsec-next-latest-14.0.0 29.12% <66.66%> (?)
appsec-next-latest-14.2.35 29.12% <66.66%> (?)
appsec-next-latest-14.2.6 29.12% <66.66%> (?)
appsec-next-latest-14.2.7 29.12% <66.66%> (?)
appsec-next-latest-15.0.0 29.12% <66.66%> (?)
appsec-next-latest-latest 29.16% <66.66%> (?)
appsec-next-oldest-11.1.4 27.33% <66.66%> (?)
appsec-next-oldest-12.3.7 29.14% <66.66%> (?)
appsec-next-oldest-13.0.0 29.14% <66.66%> (?)
appsec-next-oldest-13.5.11 29.50% <66.66%> (?)
appsec-next-oldest-14.0.0 29.44% <66.66%> (?)
appsec-next-oldest-14.2.35 29.44% <66.66%> (?)
appsec-next-oldest-14.2.6 29.44% <66.66%> (?)
appsec-next-oldest-14.2.7 29.44% <66.66%> (?)
appsec-next-oldest-15.0.0 29.44% <66.66%> (?)
appsec-next-oldest-latest 27.90% <80.00%> (?)
appsec-node-serialize 39.02% <66.66%> (?)
appsec-passport 42.66% <66.66%> (?)
appsec-postgres 46.73% <66.66%> (?)
appsec-sourcing 38.42% <66.66%> (?)
appsec-stripe 40.40% <66.66%> (?)
appsec-template 39.25% <66.66%> (?)
appsec-ubuntu 57.21% <66.66%> (?)
debugger-ubuntu-active 43.54% <66.66%> (?)
debugger-ubuntu-latest 43.54% <66.66%> (?)
debugger-ubuntu-maintenance 43.66% <66.66%> (?)
debugger-ubuntu-oldest 43.97% <66.66%> (?)
instrumentations-instrumentation-ai 45.33% <80.00%> (?)
instrumentations-instrumentation-aws-sdk 44.93% <80.00%> (?)
instrumentations-instrumentation-bluebird 27.44% <66.66%> (?)
instrumentations-instrumentation-body-parser 35.59% <66.66%> (?)
instrumentations-instrumentation-cookie-parser 29.34% <66.66%> (?)
instrumentations-instrumentation-couchbase-18 46.02% <80.00%> (?)
instrumentations-instrumentation-couchbase-eol 46.02% <80.00%> (?)
instrumentations-instrumentation-crypto 27.49% <66.66%> (?)
instrumentations-instrumentation-express 29.54% <66.66%> (?)
instrumentations-instrumentation-express-mongo-sanitize 29.45% <66.66%> (?)
instrumentations-instrumentation-express-multi-version 41.47% <0.00%> (?)
instrumentations-instrumentation-express-session 35.36% <66.66%> (?)
instrumentations-instrumentation-fastify 47.86% <80.00%> (?)
instrumentations-instrumentation-fetch 44.76% <0.00%> (?)
instrumentations-instrumentation-fs 27.20% <66.66%> (?)
instrumentations-instrumentation-generic-pool 27.02% <72.72%> (?)
instrumentations-instrumentation-http 35.02% <66.66%> (?)
instrumentations-instrumentation-http-client-options 37.53% <66.66%> (?)
instrumentations-instrumentation-kafkajs 48.94% <80.00%> (?)
instrumentations-instrumentation-knex 27.43% <66.66%> (?)
instrumentations-instrumentation-light-my-request 35.21% <66.66%> (?)
instrumentations-instrumentation-mongoose 28.54% <66.66%> (?)
instrumentations-instrumentation-multer 35.26% <66.66%> (?)
instrumentations-instrumentation-mysql2 33.38% <66.66%> (?)
instrumentations-instrumentation-openai-lifecycle 46.00% <80.00%> (?)
instrumentations-instrumentation-otel-sdk-trace 25.27% <66.66%> (?)
instrumentations-instrumentation-passport 39.15% <66.66%> (?)
instrumentations-instrumentation-passport-http 38.85% <66.66%> (?)
instrumentations-instrumentation-passport-local 39.31% <66.66%> (?)
instrumentations-instrumentation-pg 33.11% <66.66%> (?)
instrumentations-instrumentation-promise 27.39% <66.66%> (?)
instrumentations-instrumentation-promise-js 27.39% <66.66%> (?)
instrumentations-instrumentation-q 27.42% <66.66%> (?)
instrumentations-instrumentation-router 43.07% <80.00%> (?)
instrumentations-instrumentation-stripe 27.92% <66.66%> (?)
instrumentations-instrumentation-url 27.32% <66.66%> (?)
instrumentations-instrumentation-when 27.40% <66.66%> (?)
instrumentations-instrumentation-zlib 27.37% <66.66%> (?)
instrumentations-integration-esbuild-0.16.12-active 24.62% <56.23%> (?)
instrumentations-integration-esbuild-0.16.12-latest 24.62% <56.23%> (?)
instrumentations-integration-esbuild-0.16.12-maintenance 18.60% <44.26%> (+0.07%) ⬆️
instrumentations-integration-esbuild-0.16.12-oldest 18.59% <44.26%> (?)
instrumentations-integration-esbuild-latest-active 24.62% <56.23%> (?)
instrumentations-integration-esbuild-latest-latest 24.62% <56.23%> (?)
instrumentations-integration-esbuild-latest-maintenance 18.60% <44.26%> (?)
instrumentations-integration-esbuild-latest-oldest 18.59% <44.26%> (?)
llmobs-anthropic 36.49% <66.66%> (?)
llmobs-bedrock 36.01% <66.66%> (?)
llmobs-google-genai 35.77% <66.66%> (?)
llmobs-langchain 34.78% <66.66%> (?)
llmobs-openai-latest 39.42% <66.66%> (?)
llmobs-openai-oldest 39.50% <66.66%> (?)
llmobs-sdk-active 43.46% <66.66%> (?)
llmobs-sdk-latest 43.46% <66.66%> (?)
llmobs-sdk-maintenance 43.56% <66.66%> (?)
llmobs-sdk-oldest 43.55% <66.66%> (?)
llmobs-vertex-ai 35.54% <66.66%> (?)
master-coverage 92.69% <97.14%> (?)
openfeature-macos 37.41% <66.66%> (?)
openfeature-ubuntu 37.55% <66.66%> (?)
openfeature-unit-active 49.95% <0.00%> (?)
openfeature-unit-latest 49.95% <0.00%> (?)
openfeature-unit-maintenance 50.32% <0.00%> (?)
openfeature-unit-oldest 50.32% <0.00%> (?)
openfeature-windows 37.24% <66.66%> (?)
platform-core 45.98% <0.00%> (?)
platform-esbuild 46.62% <0.00%> (?)
platform-instrumentations-misc 29.34% <66.66%> (?)
platform-integration-active 46.56% <66.66%> (?)
platform-integration-latest 46.59% <66.66%> (?)
platform-integration-oldest 46.85% <66.66%> (?)
platform-shimmer 47.05% <0.00%> (?)
platform-unit-guardrails 44.04% <0.00%> (?)
platform-webpack 18.12% <44.26%> (?)
plugins-aws-durable-execution-sdk-js 32.76% <98.07%> (?)
plugins-axios 35.35% <66.66%> (?)
plugins-azure-cosmos 35.81% <66.66%> (?)
plugins-azure-event-hubs 34.68% <66.66%> (?)
plugins-azure-service-bus 35.16% <66.66%> (?)
plugins-body-parser 36.35% <66.66%> (?)
plugins-bullmq 38.93% <66.66%> (?)
plugins-cassandra 33.51% <57.14%> (?)
plugins-cookie 40.62% <80.00%> (?)
plugins-cookie-parser 40.45% <80.00%> (?)
plugins-crypto 42.36% <0.00%> (?)
plugins-dd-trace-api 33.21% <66.66%> (?)
plugins-express-mongo-sanitize 40.51% <80.00%> (?)
plugins-express-session 40.37% <80.00%> (?)
plugins-fastify 37.66% <66.66%> (?)
plugins-fs 33.63% <66.66%> (?)
plugins-generic-pool 39.94% <80.00%> (?)
plugins-google-cloud-pubsub 41.33% <57.14%> (?)
plugins-grpc 36.42% <57.14%> (?)
plugins-handlebars 40.51% <80.00%> (?)
plugins-hapi 35.49% <66.66%> (?)
plugins-hono 35.82% <66.66%> (?)
plugins-ioredis 34.19% <57.14%> (?)
plugins-jest 27.10% <0.00%> (?)
plugins-knex 39.98% <80.00%> (?)
plugins-langgraph 32.24% <66.66%> (?)
plugins-ldapjs 38.96% <80.00%> (?)
plugins-light-my-request 40.08% <80.00%> (?)
plugins-limitd-client 27.81% <66.66%> (?)
plugins-lodash 40.12% <80.00%> (?)
plugins-mariadb 35.02% <57.14%> (?)
plugins-memcached 33.58% <57.14%> (?)
plugins-microgateway-core 34.68% <66.66%> (?)
plugins-modelcontextprotocol-sdk 32.19% <66.66%> (?)
plugins-moleculer 36.48% <57.14%> (?)
plugins-mongodb 35.63% <57.14%> (?)
plugins-mongodb-core 35.31% <57.14%> (?)
plugins-mongoose 34.21% <66.66%> (?)
plugins-multer 40.42% <80.00%> (?)
plugins-mysql 34.36% <57.14%> (?)
plugins-mysql2 34.84% <57.14%> (?)
plugins-nats 36.22% <57.14%> (?)
plugins-node-serialize 40.65% <80.00%> (?)
plugins-opensearch 33.45% <57.14%> (?)
plugins-passport-http 40.24% <80.00%> (?)
plugins-postgres 34.55% <57.14%> (?)
plugins-process 42.36% <0.00%> (?)
plugins-pug 40.62% <80.00%> (?)
plugins-redis 34.17% <57.14%> (?)
plugins-router 37.90% <66.66%> (?)
plugins-sequelize 39.90% <80.00%> (?)
plugins-test-and-upstream-amqp10 33.72% <57.14%> (?)
plugins-test-and-upstream-amqplib 38.91% <57.14%> (?)
plugins-test-and-upstream-apollo 34.67% <57.14%> (?)
plugins-test-and-upstream-avsc 33.60% <66.66%> (?)
plugins-test-and-upstream-bunyan 28.90% <66.66%> (?)
plugins-test-and-upstream-connect 36.16% <66.66%> (?)
plugins-test-and-upstream-graphql 35.91% <57.14%> (?)
plugins-test-and-upstream-koa 35.67% <66.66%> (?)
plugins-test-and-upstream-protobufjs 33.84% <66.66%> (?)
plugins-test-and-upstream-rhea 39.04% <57.14%> (?)
plugins-undici 34.43% <57.14%> (?)
plugins-url 42.36% <0.00%> (?)
plugins-valkey 33.67% <57.14%> (?)
plugins-vm 42.36% <0.00%> (?)
plugins-winston 29.54% <66.66%> (?)
plugins-ws 36.97% <66.66%> (?)
profiling-macos 43.05% <66.66%> (?)
profiling-ubuntu 43.53% <66.66%> (?)
profiling-windows 40.81% <66.66%> (?)
serverless-aws-sdk-latest-bedrockruntime 31.84% <66.66%> (?)
serverless-aws-sdk-latest-client 36.32% <80.00%> (?)
serverless-aws-sdk-latest-eventbridge 26.84% <66.66%> (?)
serverless-aws-sdk-latest-kinesis 37.03% <57.14%> (?)
serverless-aws-sdk-latest-lambda 34.28% <57.14%> (?)
serverless-aws-sdk-latest-s3 32.19% <57.14%> (?)
serverless-aws-sdk-latest-serverless-peer-service 39.16% <66.66%> (?)
serverless-aws-sdk-latest-sns 38.05% <57.14%> (?)
serverless-aws-sdk-latest-sqs 37.67% <57.14%> (?)
serverless-aws-sdk-latest-stepfunctions 32.86% <66.66%> (?)
serverless-aws-sdk-latest-util 46.39% <0.00%> (?)
serverless-aws-sdk-oldest-aws-sdk 33.06% <66.66%> (?)
serverless-aws-sdk-oldest-bedrockruntime 31.94% <66.66%> (?)
serverless-aws-sdk-oldest-client 36.88% <80.00%> (?)
serverless-aws-sdk-oldest-dynamodb 33.87% <66.66%> (?)
serverless-aws-sdk-oldest-eventbridge 26.92% <66.66%> (?)
serverless-aws-sdk-oldest-kinesis 37.21% <57.14%> (?)
serverless-aws-sdk-oldest-lambda 34.38% <57.14%> (?)
serverless-aws-sdk-oldest-s3 32.33% <57.14%> (?)
serverless-aws-sdk-oldest-serverless-peer-service 39.25% <66.66%> (?)
serverless-aws-sdk-oldest-sns 38.15% <57.14%> (?)
serverless-aws-sdk-oldest-sqs 37.75% <57.14%> (?)
serverless-aws-sdk-oldest-stepfunctions 32.96% <66.66%> (?)
serverless-aws-sdk-oldest-util 47.13% <0.00%> (?)
serverless-azure-durable-functions 36.62% <66.66%> (?)
serverless-azure-functions-eventhubs 38.26% <66.66%> (?)
serverless-azure-functions-servicebus 38.31% <66.66%> (?)
serverless-lambda 34.27% <66.66%> (?)
test-optimization-cucumber-latest-7.0.0 49.95% <66.66%> (?)
test-optimization-cucumber-latest-latest 52.69% <66.66%> (?)
test-optimization-cypress-latest-12.0.0-commonJS 49.30% <66.66%> (?)
test-optimization-cypress-latest-12.0.0-esm 48.82% <66.66%> (?)
test-optimization-cypress-latest-14.5.4-commonJS 48.98% <66.66%> (?)
test-optimization-cypress-latest-14.5.4-esm 49.18% <66.66%> (?)
test-optimization-cypress-latest-latest-commonJS 48.62% <66.66%> (?)
test-optimization-cypress-latest-latest-esm 49.66% <66.66%> (?)
test-optimization-cypress-oldest-12.0.0-commonJS 49.38% <66.66%> (?)
test-optimization-cypress-oldest-12.0.0-esm 49.41% <66.66%> (?)
test-optimization-cypress-oldest-14.5.4-commonJS 47.79% <66.66%> (?)
test-optimization-cypress-oldest-14.5.4-esm 47.34% <66.66%> (?)
test-optimization-jest-latest-latest 55.38% <66.66%> (?)
test-optimization-jest-latest-oldest 54.30% <66.66%> (?)
test-optimization-jest-oldest-latest 55.43% <66.66%> (?)
test-optimization-jest-oldest-oldest 54.31% <66.66%> (?)
test-optimization-mocha-latest-latest 53.63% <66.66%> (?)
test-optimization-mocha-latest-oldest 51.18% <66.66%> (?)
test-optimization-mocha-oldest-latest 53.73% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-active-test-span 44.25% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-atr 42.87% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-efd 43.30% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-final-status 43.39% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.85% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-reporting 42.91% <66.66%> (?)
test-optimization-playwright-latest-latest-playwright-test-management 44.52% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.06% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-atr 42.95% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-efd 43.22% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-final-status 43.29% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.77% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-reporting 42.73% <66.66%> (?)
test-optimization-playwright-latest-oldest-playwright-test-management 44.47% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-atr 42.95% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-efd 43.37% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-final-status 43.44% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-impacted-tests 42.93% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-reporting 42.97% <66.66%> (?)
test-optimization-playwright-oldest-latest-playwright-test-management 44.58% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.15% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-efd 43.31% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-final-status 43.40% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 42.85% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-reporting 42.79% <66.66%> (?)
test-optimization-playwright-oldest-oldest-playwright-test-management 44.53% <66.66%> (?)
test-optimization-selenium-latest 45.20% <66.66%> (?)
test-optimization-selenium-oldest 44.78% <66.66%> (?)
test-optimization-testopt-active 48.30% <66.66%> (?)
test-optimization-testopt-latest 48.30% <66.66%> (?)
test-optimization-testopt-maintenance 48.29% <66.66%> (?)
test-optimization-testopt-oldest 49.39% <66.66%> (?)
test-optimization-vitest-latest 50.75% <66.66%> (?)
test-optimization-vitest-oldest 47.96% <66.66%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Apr 15, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bc54581 | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Apr 15, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-16 12:15:24

Comparing candidate commit bc54581 in PR branch joey/apm-ai-toolkit/aws-durable-execution-sdk-js with baseline commit e338419 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1936 metrics, 14 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-154.665ms; +162.413ms] or [-5.899%; +6.195%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-174259.103µs; +175512.403µs] or [-7.015%; +7.065%]

scenario:appsec-control-20

  • unstable execution_time [-134.644ms; +130.730ms] or [-7.831%; +7.603%]

scenario:appsec-control-24

  • unstable execution_time [-87713.570µs; +87939.337µs] or [-7.360%; +7.379%]

scenario:appsec-control-26

  • unstable execution_time [-93.285ms; +95.340ms] or [-7.915%; +8.090%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable max_rss_usage [-15.013MB; +23.401MB] or [-5.334%; +8.315%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-295.980ms; +379.887ms] or [-6.065%; +7.784%]
  • unstable execution_time [-289.845ms; +381.662ms] or [-5.847%; +7.700%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-24

  • unstable cpu_user_time [-365.529ms; +263.001ms] or [-8.438%; +6.071%]
  • unstable execution_time [-397.366ms; +282.114ms] or [-8.618%; +6.119%]
  • unstable max_rss_usage [-46.482MB; +36.123MB] or [-8.799%; +6.838%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-4.437MB; +13.858MB] or [-3.080%; +9.620%]

scenario:spans-finish-later-26

  • unstable max_rss_usage [-18.035MB; +12.143MB] or [-10.897%; +7.337%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-5957.097KB; +7670.431KB] or [-7.106%; +9.150%]

@joeyzhao2018
joeyzhao2018 requested a review from wconti27 April 21, 2026 15:18
@wconti27 wconti27 added the apm-integration-toolkit PR Generated by APM AI Integration Toolkit label Apr 21, 2026
@pablomartinezbernardo
pablomartinezbernardo force-pushed the joey/apm-ai-toolkit/aws-durable-execution-sdk-js branch 2 times, most recently from c1c351e to 7756bba Compare May 11, 2026 10:21
Comment on lines +27 to +31
function getOperationId (ctxImpl) {
const stepId = ctxImpl?.getNextStepId?.()
if (!stepId) return
return createHash('md5').update(stepId).digest('hex').slice(0, 16)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine I would think

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not ideal due to the CPU overhead.

Are we able to modify the source code of the file generating the hash to be able to access it? E.g. using orchestrion?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the CPU overhead the issue? Even if we were able to access it using orchestrion (which doesn't seem to be the case for being private), and we could call it, we would just be running the same code.

This hash is used for 2 things by aws

  • Accessing replayed operations, the unique hash is used to have direct access in a dict
  • Showing it in the UI

There is no place where the hash is calculated for fresh (meaning non-replayed) operations, there's no place where we can hook onto to get this value for fresh operations.

The drawback I see from this is actually having to replicate code in our tracer, but I can't see a way to avoid it if we need to have the operation hash.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Orchestrion-JS we should be able to replace existing code of the library. Thus, we would be able to intercept the original implementation without additional overhead.

About CPU overhead: we are currently working hard to get the tracer to perform super fast.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that there is no good place to intercept this function call, it's not reliably called at any point in the process where we can correlate it with the span.

If this is unacceptable, the alternative may actually be removing this field. This will impact other components though

@pablomartinezbernardo pablomartinezbernardo changed the title New Integration. aws-durable-execution-sdk-js. feat(aws): aws-durable-execution-sdk-js instrumentation May 12, 2026
@pablomartinezbernardo
pablomartinezbernardo marked this pull request as ready for review May 12, 2026 14:21
@pablomartinezbernardo
pablomartinezbernardo requested review from a team as code owners May 12, 2026 14:21
@pablomartinezbernardo
pablomartinezbernardo requested review from khanayan123 and rochdev and removed request for a team May 12, 2026 14:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a893b2db18

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js Outdated
Comment thread .github/workflows/apm-integrations.yml Outdated
Comment thread packages/datadog-instrumentations/src/aws-durable-execution-sdk-js.js Outdated
const data = ctx?.arguments?.[1]
if (data?.Action !== 'RETRY' || !data.Error) return

const span = this.activeSpan

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const span = this.activeSpan
const span = ctx.currentStore?.span

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AwsDurableExecutionSdkJsCheckpointPlugin doesn't create spans, it just enriches the span. As it doesn't create a span, ctx.currentStore.span will be undefined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we certain the activeSpan is the correct checkpoint part? Could the checkpoint run outside of original context? We would place the checkpoint on the wrong span in that case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are certain, checkpointing is done synchronously here

Comment on lines +199 to +202
if (!pkgJson) {
const requireFromWorkspace = createRequire(join(folder, 'package.json'))
const nodeModulesPaths = requireFromWorkspace.resolve.paths(externalName)
pkgJson = requirePackageJson(externalName, { paths: nodeModulesPaths })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled under the hood already and is unnecessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah forgot to mention this

aws-durable-execution-sdk-js only exports .

pkgJsonPath does require.resolve('@aws/durable-execution-sdk-js/package.json') which throws ERR_PACKAGE_PATH_NOT_EXPORTED.

From what I've seen the way to solve properly would be this https://nodejs.org/api/module.html#modulefindpackagejsonspecifier-base but... node 22

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of libraries do this, why are we only hitting this issue now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this doesn't happen that often: assertPeerDependencies is only run for libraries with dep: true in externals.js. And from all those, this is the only case where exports is used without exporting the package.json, but could happen for other libraries as well

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling this won't work properly when the customer bundles their application. Can you throw an acceptance test into the esbuild integration tests directory that installs this package? You should see other examples in there when we discover a tricky package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the acceptance test e1a2f7c . The exports restriction shouldn't affect bundling, no? Both the esbuild plugin and the runtime resolver read package.json off disk, this fix is only for CI workspace generation.

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/test/index.spec.js Outdated
if (!span || span._spanContext?._tags?.error) return

const { ErrorMessage, ErrorType, StackTrace } = data.Error
span.setTag('error', 1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not creating a span? Otherwise the only options are overwriting an existing error or dropping it completely, both of which are not ideal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not creating a span?

Because checkpointing is not an operation we really want to trace for the customer, the user doesn't run the checkpoint operation: the SDK checkpoints automatically after each step execution.

The error is first visible at the beginning of the checkpoint. Steps don't throw themselves when there is a user error (They could throw if there's a bug in the SDK when creating the promise, though). This condition shouldn't ever happen, no error should be set on the span prior to us seeing the checkpoint.

Do you think removing the condition would make it clearer?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We trace what the process is doing, not what the user is doing, so if checkpoints are happening shouldn't we be tracing them? Especially if it's an operation that can fail. Setting the error on another span is way more confusing.

@pablomartinezbernardo pablomartinezbernardo May 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data.Error here isn't a checkpoint failure, it's the user step's error object. On Action: RETRY the SDK doesn't throw or settle the step's promise, so the step's settle channel never fires. The checkpoint is where we can observe the user error. This is also the reason why we are finishing the span here.

Checkpoint operations themselves can fail only because of network/AWS errors, but they are already traced as a generic aws.request, they don't contain additional information relevant to durable functions other than the error on the step we are retrieving from here.

if (ErrorType) span.setTag('error.type', ErrorType)
if (Array.isArray(StackTrace)) span.setTag('error.stack', StackTrace.join('\n'))

ctx._ddRetryStepSpan = span

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use an underscore property on the context?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be able to finish the span in the asyncEnd. We could also either
a) finish it in start, the difference in time wouldn't be that big, but it would finish earlier
b) actually do this.activeSpan?.finish() on asyncEnd, but we would need to check again for conditions like data?.Action !== 'RETRY'

Would you rather see any of these? Or maybe I'm misunderstanding your question?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was why is the property underscored?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, because claude (seemingly incorrectly) chose it, and it looked reasonable. Seems like this PR is the first and only one that introduced this pattern, maybe we want to update it as well so AIs don't get confused? #7669

In any case, updated the name in my PR.

* rejection reason on failure.
* @returns {void}
*/
function observeDurablePromise (dp, onSettle) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be patching on the plugin side. Any way to instead patch the thenable directly at the source with a corresponding additional channel?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense, addressed in 5289e4d can you have a look?

Comment on lines +199 to +202
if (!pkgJson) {
const requireFromWorkspace = createRequire(join(folder, 'package.json'))
const nodeModulesPaths = requireFromWorkspace.resolve.paths(externalName)
pkgJson = requirePackageJson(externalName, { paths: nodeModulesPaths })

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of libraries do this, why are we only hitting this issue now?

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/client.js Outdated
…/aws-durable-execution-sdk-js

# Conflicts:
#	supported_versions_output.json
#	supported_versions_table.csv
…/aws-durable-execution-sdk-js

# Conflicts:
#	packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js
#	packages/dd-trace/test/plugins/versions/package.json
#	supported_versions_table.csv

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides existing comments, this looks pretty solid! I did not review the tests closely though. I might have missed that but I believe we could also add an ESM test?

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js Outdated
@pablomartinezbernardo

Copy link
Copy Markdown
Contributor

Besides existing comments, this looks pretty solid! I did not review the tests closely though. I might have missed that but I believe we could also add an ESM test?

@BridgeAR Added them a49360e !

tlhunter
tlhunter previously approved these changes Jun 3, 2026
while (typeof err.errorType === 'string' && err.cause instanceof Error) {
err = err.cause
}
return { ...ctxOrError, error: err }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return { ...ctxOrError, error: err }
return err

I think we only need the error :)

const data = ctx?.arguments?.[1]
if (data?.Action !== 'RETRY' || !data.Error) return

const span = this.activeSpan

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we certain the activeSpan is the correct checkpoint part? Could the checkpoint run outside of original context? We would place the checkpoint on the wrong span in that case.


module.exports = {
// Only list unprefixed node modules. They will automatically be instrumented as prefixed and unprefixed.
'@aws/durable-execution-sdk-js': () => require('../aws-durable-execution-sdk-js'),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind moving this down to separate Node.js modules from the rest? :)

@pablomartinezbernardo pablomartinezbernardo Jun 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course 🤦 completely missed this

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/checkpoint.js Outdated
Comment on lines +60 to +61
shimmer.massWrap(dp, ['then', 'catch', 'finally'], original => function (...args) {
attachSpy()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could change the prototype of the promise and prevent rewrapping each promise afterwards. That should likely be more performant :)

* @returns {boolean}
*/
function isReplayedOp (ctxImpl) {
const stepId = ctxImpl?.getNextStepId?.()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the getNextStepId method is currently called twice in many cases where we could unify it to a single call for performance

Comment on lines +5 to +15
const contextMethods = [
'step',
'invoke',
'runInChildContext',
'wait',
'waitForCondition',
'waitForCallback',
'createCallback',
'map',
'parallel',
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we reuse this list to prevent the duplication? :)

…/aws-durable-execution-sdk-js

# Conflicts:
#	packages/dd-trace/test/plugins/versions/package.json
Persist the current trace context as a synthetic `_datadog_{N}` STEP operation
when the SDK suspends to PENDING, so subsequent invocations (read by the
upstream datadog-lambda-js wrapper) can resume the same trace.

---------

Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
BridgeAR
BridgeAR previously approved these changes Jun 15, 2026

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good work :)

…/aws-durable-execution-sdk-js

# Conflicts:
#	packages/dd-trace/test/plugins/versions/package.json
…/aws-durable-execution-sdk-js

# Conflicts:
#	packages/dd-trace/test/plugins/versions/package.json
@pablomartinezbernardo
pablomartinezbernardo enabled auto-merge (squash) June 16, 2026 12:13
@pablomartinezbernardo
pablomartinezbernardo merged commit 261c076 into master Jun 16, 2026
801 checks passed
@pablomartinezbernardo
pablomartinezbernardo deleted the joey/apm-ai-toolkit/aws-durable-execution-sdk-js branch June 16, 2026 12:16
dd-octo-sts Bot added a commit that referenced this pull request Jun 16, 2026
* workflow(aws-durable-execution-sdk-js): install_package

* workflow(aws-durable-execution-sdk-js): generate_app

* workflow(aws-durable-execution-sdk-js): compile

* workflow(aws-durable-execution-sdk-js): test:att1:iter1:fixer

* workflow(aws-durable-execution-sdk-js): test:att1:iter2:fixer

* workflow(aws-durable-execution-sdk-js): feature_implement

* workflow(aws-durable-execution-sdk-js): get_lint_failures

* workflow(aws-durable-execution-sdk-js): lint_and_fix:att1:iter1:fix_lint_errors

* workflow(aws-durable-execution-sdk-js): review_cycle:att1:iter1:batch_fix

* remove the unnecessary dd-api-key

* clean up

# Conflicts:
#	index.d.ts

* yarn.lock changed...

* fixing yarn.lock

* remove the unintended finish() guard

* update span names

* use a fixed service name instead

* update resource names

* naming consistency

* small fix

* Python  PR parity

* Undo unnecessary changes

* Finish error spans on asyncEnd

* Simplify orchestrion file

* Class/file name changes

* Several simplifications and improvements

* Do not explicitly set component

* Remove includeReplayedTag

* Smaller simplifications

* Tests simplification

* chore: update supported-integrations

* More test simplification

* Add aws.durable.operation_id and aws.durable.operation_name

* Fix checks

* Linter

* Test simplifications

* More test improvements

* Lazy thenables + only close this integration's spans

* Code simplifications

* Fix rebase

* Mirror changes in v5

* Test waitForCondition happy path

* Comment improvements based on guidelines

* supress child context for WaitForCallback

* Increase tested version

* Address review comments

* Avoid patching on the plugin by creating a "settle" channel

* Do not skipTime to avoid interfering with tracer's timers

* Fix test flakiness

* Test durable-execution-sdk-js  only on node >=22

* Linter

* Rename context variables

* Lint

* Add esbuild bundling acceptance test

* ESM smoke tests

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/checkpoint.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Address various review comments

* Operation name

* feat(aws): cross-invocation tracecontext propagation (#8182)

Persist the current trace context as a synthetic `_datadog_{N}` STEP operation
when the SDK suspends to PENDING, so subsequent invocations (read by the
upstream datadog-lambda-js wrapper) can resume the same trace.

---------

Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Pablo Martínez Bernardo <[email protected]>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
Co-authored-by: pablomartinezbernardo <[email protected]>
Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jun 16, 2026
BridgeAR added a commit that referenced this pull request Jun 16, 2026
* workflow(aws-durable-execution-sdk-js): install_package

* workflow(aws-durable-execution-sdk-js): generate_app

* workflow(aws-durable-execution-sdk-js): compile

* workflow(aws-durable-execution-sdk-js): test:att1:iter1:fixer

* workflow(aws-durable-execution-sdk-js): test:att1:iter2:fixer

* workflow(aws-durable-execution-sdk-js): feature_implement

* workflow(aws-durable-execution-sdk-js): get_lint_failures

* workflow(aws-durable-execution-sdk-js): lint_and_fix:att1:iter1:fix_lint_errors

* workflow(aws-durable-execution-sdk-js): review_cycle:att1:iter1:batch_fix

* remove the unnecessary dd-api-key

* clean up

# Conflicts:
#	index.d.ts

* yarn.lock changed...

* fixing yarn.lock

* remove the unintended finish() guard

* update span names

* use a fixed service name instead

* update resource names

* naming consistency

* small fix

* Python  PR parity

* Undo unnecessary changes

* Finish error spans on asyncEnd

* Simplify orchestrion file

* Class/file name changes

* Several simplifications and improvements

* Do not explicitly set component

* Remove includeReplayedTag

* Smaller simplifications

* Tests simplification

* chore: update supported-integrations

* More test simplification

* Add aws.durable.operation_id and aws.durable.operation_name

* Fix checks

* Linter

* Test simplifications

* More test improvements

* Lazy thenables + only close this integration's spans

* Code simplifications

* Fix rebase

* Mirror changes in v5

* Test waitForCondition happy path

* Comment improvements based on guidelines

* supress child context for WaitForCallback

* Increase tested version

* Address review comments

* Avoid patching on the plugin by creating a "settle" channel

* Do not skipTime to avoid interfering with tracer's timers

* Fix test flakiness

* Test durable-execution-sdk-js  only on node >=22

* Linter

* Rename context variables

* Lint

* Add esbuild bundling acceptance test

* ESM smoke tests

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/checkpoint.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Address various review comments

* Operation name

* feat(aws): cross-invocation tracecontext propagation (#8182)

Persist the current trace context as a synthetic `_datadog_{N}` STEP operation
when the SDK suspends to PENDING, so subsequent invocations (read by the
upstream datadog-lambda-js wrapper) can resume the same trace.

---------

Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Pablo Martínez Bernardo <[email protected]>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
Co-authored-by: pablomartinezbernardo <[email protected]>
Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
tlhunter pushed a commit that referenced this pull request Jun 18, 2026
* workflow(aws-durable-execution-sdk-js): install_package

* workflow(aws-durable-execution-sdk-js): generate_app

* workflow(aws-durable-execution-sdk-js): compile

* workflow(aws-durable-execution-sdk-js): test:att1:iter1:fixer

* workflow(aws-durable-execution-sdk-js): test:att1:iter2:fixer

* workflow(aws-durable-execution-sdk-js): feature_implement

* workflow(aws-durable-execution-sdk-js): get_lint_failures

* workflow(aws-durable-execution-sdk-js): lint_and_fix:att1:iter1:fix_lint_errors

* workflow(aws-durable-execution-sdk-js): review_cycle:att1:iter1:batch_fix

* remove the unnecessary dd-api-key

* clean up

# Conflicts:
#	index.d.ts

* yarn.lock changed...

* fixing yarn.lock

* remove the unintended finish() guard

* update span names

* use a fixed service name instead

* update resource names

* naming consistency

* small fix

* Python  PR parity

* Undo unnecessary changes

* Finish error spans on asyncEnd

* Simplify orchestrion file

* Class/file name changes

* Several simplifications and improvements

* Do not explicitly set component

* Remove includeReplayedTag

* Smaller simplifications

* Tests simplification

* chore: update supported-integrations

* More test simplification

* Add aws.durable.operation_id and aws.durable.operation_name

* Fix checks

* Linter

* Test simplifications

* More test improvements

* Lazy thenables + only close this integration's spans

* Code simplifications

* Fix rebase

* Mirror changes in v5

* Test waitForCondition happy path

* Comment improvements based on guidelines

* supress child context for WaitForCallback

* Increase tested version

* Address review comments

* Avoid patching on the plugin by creating a "settle" channel

* Do not skipTime to avoid interfering with tracer's timers

* Fix test flakiness

* Test durable-execution-sdk-js  only on node >=22

* Linter

* Rename context variables

* Lint

* Add esbuild bundling acceptance test

* ESM smoke tests

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Update packages/datadog-plugin-aws-durable-execution-sdk-js/src/checkpoint.js

Co-authored-by: Ruben Bridgewater <[email protected]>

* Address various review comments

* Operation name

* feat(aws): cross-invocation tracecontext propagation (#8182)

Persist the current trace context as a synthetic `_datadog_{N}` STEP operation
when the SDK suspends to PENDING, so subsequent invocations (read by the
upstream datadog-lambda-js wrapper) can resume the same trace.

---------

Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Pablo Martínez Bernardo <[email protected]>
Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
Co-authored-by: pablomartinezbernardo <[email protected]>
Co-authored-by: Ruben Bridgewater <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm-integration-toolkit PR Generated by APM AI Integration Toolkit semver-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants