Skip to content

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

Open
joeyzhao2018 wants to merge 8 commits into
joey/apm-ai-toolkit/aws-durable-execution-sdk-jsfrom
joey/cross-invocation-tracecontext-propagation
Open

feat(aws): cross-invocation tracecontext propagation#8182
joeyzhao2018 wants to merge 8 commits into
joey/apm-ai-toolkit/aws-durable-execution-sdk-jsfrom
joey/cross-invocation-tracecontext-propagation

Conversation

@joeyzhao2018
Copy link
Copy Markdown
Contributor

@joeyzhao2018 joeyzhao2018 commented Apr 30, 2026

Summary

Adds cross-invocation trace-context continuity for the @aws/durable-execution-sdk-js integration. Each invocation of a durable execution now writes datadog{N} checkpoints on suspend when the trace context updates, so subsequent invocations of the same execution can extract the trace context from checkpoints and attach to a common anchor span. NOTE : The extraction part of these checkpoints is in DataDog/datadog-lambda-js#774

Motivation

A durable execution is a logically single workflow that the SDK transparently runs across N Lambda invocations (suspending on ctx.wait, ctx.waitForCallback, ctx.invoke, retries, etc.).
Before this PR, dd-trace produced one isolated trace per physical invocation. Customers couldn't see the workflow end-to-end in APM.

This PR makes those invocations show up under a single anchor, while leaving the per-invocation aws.durable.execute spans intact.

Without this, every resume of a suspended durable execution starts a fresh, unconnected trace.

Changes

New module: packages/datadog-plugin-aws-durable-execution-sdk-js/src/trace-checkpoint.js

  • saveTraceContextCheckpointIfUpdated(tracer, span, durableContext, firstExecutionSpanId, event) — writes a Datadog-format trace context (x-datadog-* headers) as a datadog{N} STEP
    operation via the SDK's checkpoint manager.
  • Always injects Datadog-style headers regardless of DD_TRACE_PROPAGATION_STYLE_INJECT, since the payload is read back by Datadog code only.
  • Idempotent within an execution: the stepId is a deterministic blake2b(name:executionArn) hash, so re-running the same handler won't write duplicate ops.
  • Skips the write when the current context is byte-identical to the most recent datadog{N} (ignoring x-datadog-parent-id, which always changes).
  • All checkpoints in a given execution carry the same anchor parent_id: the first save anchors at the aws.durable.execute span id; every subsequent save reuses the prior checkpoint's
    anchor verbatim.

_installTerminationCheckpointHook will:

  1. Wraps the user handler (args[5]) to capture DurableContextImpl.
  2. Wraps terminationManager.terminate so that on every PENDING reason it kicks off maybeSaveCheckpoint → saveCheckpoint (trace-checkpoint.js:126-155), which issues two
    checkpointManager.checkpoint(stepId, START) + checkpoint(stepId, SUCCEED) calls.

Tests

Screenshot 2026-05-20 at 3 01 26 PM Screenshot 2026-05-20 at 3 01 00 PM

Why commenting out some tests

All three tests race against a TimerScheduler bug in @aws/durable-execution-sdk-js that is fixed upstream in aws/aws-durable-execution-sdk-js#544. Once that fix is published in a release we pin against, the skips will be removed.

The race only manifests at the suspend → resume boundary when resume is driven externally (by sendCallbackSuccess() for wait_for_callback, or by the target function completing for chained invoke()). Timer-driven resumes (ctx.wait, ctx.waitForCondition, etc.) take a single, ordered code path through TimerScheduler and are unaffected.

This PR adds the cross-invocation trace-context checkpoint hook. On every PENDING termination, the hook calls back into the SDK via checkpointManager.checkpoint(stepId, START) + checkpoint(stepId, SUCCEED). That extra async work overlaps with the SDK's own pending-state bookkeeping at the same boundary where TimerScheduler is coordinating drain — which is precisely the state machine #544 cleans up.

Why production is unaffected

The TimerScheduler code path involved is only used by @aws/durable-execution-sdk-js-testing's LocalDurableTestRunner (simulated clock + in-process callback resolution). Real Lambda invocations don't drive resume through TimerScheduler — the resume of a suspended execution is a fresh invocation initiated by the Durable Execution service, not a continuation inside the same process. The checkpoint writes themselves complete normally; what races is the test harness's observation of the resumed invocation.

Other Notes

REPLAY -> NEW transitions

In dd-trace-py PR-17773, mark_trace_context_checkpoints_visited method was added to address a glitch caused by the datadog{N} steps we added. That issue doesn't exist for NodeJS.

Python SDK pattern:

  • Tracks visited ops as a set (state._visited_operations), keyed by op_id.
  • track_replay(op_id) adds to the set. REPLAY → NEW transitions only when every completed op in state.operations is in the
    visited set.
  • Our datadog* ops are completed-but-never-visited → permanently blocks the transition.
  • Hence the fix: pre-visit them at handler start.

Node.js SDK pattern (durable-context.ts:209):

private checkAndUpdateReplayMode(): void {
   if (this.durableExecutionMode === DurableExecutionMode.ReplayMode) {
     const nextStepId = this.getNextStepId();          // "1", "2", ... from _stepCounter
     const nextStepData = this.executionContext.getStepData(nextStepId);
     if (!nextStepData) { 
       this.durableExecutionMode = DurableExecutionMode.ExecutionMode;
     } 
   }
 } 
  • Replay exits per-call via a sequential step-id lookup (_stepCounter → "1", "2", ...), not a "all ops visited" check.
  • getStepData("N") is keyed by md5("N").slice(0, 16) (step-id-utils.ts:11).
  • Our datadog* ops use blake2b stepIds (trace-checkpoint.js:184) — they live in stepData under a totally separate hash namespace and aren't found by any getStepData("N") lookup. They don't appear in the sequential chain user code walks.
    So our synthetic ops are invisible to the SDK's replay-mode bookkeeping — they can't keep it stuck in REPLAY.

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 1, 2026

Benchmarks

Benchmark execution time: 2026-05-20 19:53:38

Comparing candidate commit 9a25134 in PR branch joey/cross-invocation-tracecontext-propagation with baseline commit 531d682 in branch joey/apm-ai-toolkit/aws-durable-execution-sdk-js.

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

@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
@joeyzhao2018 joeyzhao2018 force-pushed the joey/cross-invocation-tracecontext-propagation branch from 3eec288 to 2df8f55 Compare May 13, 2026 21:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Overall package size

Self size: 5.86 MB
Deduped: 6.9 MB
No deduping: 6.9 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 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

@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented May 13, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 73.39%
Overall Coverage: 86.41% (-0.06%)

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 8.55263% with 139 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.25%. Comparing base (ed36ad4) to head (3367011).

Files with missing lines Patch % Lines
...s-durable-execution-sdk-js/src/trace-checkpoint.js 6.14% 107 Missing ⚠️
...plugin-aws-durable-execution-sdk-js/src/handler.js 15.78% 32 Missing ⚠️
Additional details and impacted files
@@                                 Coverage Diff                                  @@
##           joey/apm-ai-toolkit/aws-durable-execution-sdk-js    #8182      +/-   ##
====================================================================================
- Coverage                                             89.71%   83.25%   -6.46%     
====================================================================================
  Files                                                   852      816      -36     
  Lines                                                 45610    43724    -1886     
  Branches                                               8457     7977     -480     
====================================================================================
- Hits                                                  40920    36404    -4516     
- Misses                                                 4690     7320    +2630     
Flag Coverage Δ
aiguard-integration-active 40.55% <ø> (-0.67%) ⬇️
aiguard-integration-latest 40.50% <ø> (-0.67%) ⬇️
aiguard-integration-maintenance 40.55% <ø> (-0.67%) ⬇️
aiguard-macos 35.24% <ø> (-0.17%) ⬇️
aiguard-ubuntu 35.34% <ø> (-0.17%) ⬇️
aiguard-windows 35.15% <ø> (-0.17%) ⬇️
apm-capabilities-tracing-macos 48.73% <8.55%> (-0.17%) ⬇️
apm-capabilities-tracing-ubuntu-active 48.75% <8.55%> (-0.16%) ⬇️
apm-capabilities-tracing-ubuntu-latest 48.72% <8.55%> (-0.17%) ⬇️
apm-capabilities-tracing-ubuntu-maintenance ?
apm-capabilities-tracing-ubuntu-oldest 48.74% <8.55%> (-0.35%) ⬇️
apm-capabilities-tracing-windows ?
apm-integrations-aerospike-18-gte.5.2.0 34.27% <ø> (-0.19%) ⬇️
apm-integrations-aerospike-20-gte.5.5.0 34.29% <ø> (-0.19%) ⬇️
apm-integrations-aerospike-22-gte.5.12.1 34.29% <ø> (-0.19%) ⬇️
apm-integrations-aerospike-22-gte.6.0.0 34.29% <ø> (-0.19%) ⬇️
apm-integrations-aerospike-eol- 34.20% <ø> (-0.19%) ⬇️
apm-integrations-child-process 35.26% <ø> (-0.21%) ⬇️
apm-integrations-confluentinc-kafka-javascript-18 ?
apm-integrations-confluentinc-kafka-javascript-20 41.11% <ø> (-0.26%) ⬇️
apm-integrations-confluentinc-kafka-javascript-22 41.11% <ø> (-0.26%) ⬇️
apm-integrations-confluentinc-kafka-javascript-24 41.05% <ø> (-0.26%) ⬇️
apm-integrations-couchbase-18 ?
apm-integrations-couchbase-eol 34.62% <ø> (-0.04%) ⬇️
apm-integrations-dns 34.14% <ø> (-0.21%) ⬇️
apm-integrations-elasticsearch 34.93% <ø> (-0.16%) ⬇️
apm-integrations-http-latest 42.08% <ø> (-0.16%) ⬇️
apm-integrations-http-maintenance 42.13% <ø> (-0.16%) ⬇️
apm-integrations-http-oldest 42.14% <ø> (-0.16%) ⬇️
apm-integrations-http2 39.45% <ø> (-0.16%) ⬇️
apm-integrations-kafkajs-latest ?
apm-integrations-kafkajs-oldest ?
apm-integrations-net 34.84% <ø> (-0.22%) ⬇️
apm-integrations-next-11.1.4 29.05% <ø> (-0.09%) ⬇️
apm-integrations-next-12.3.7 ?
apm-integrations-next-13.0.0 ?
apm-integrations-next-13.2.0 30.73% <ø> (-0.10%) ⬇️
apm-integrations-next-13.5.11 ?
apm-integrations-next-14.0.0 ?
apm-integrations-next-14.2.35 ?
apm-integrations-next-14.2.6 ?
apm-integrations-next-14.2.7 ?
apm-integrations-next-15.0.0 ?
apm-integrations-next-15.4.0 ?
apm-integrations-next-gte.10.2.0.and.lt.11 23.59% <ø> (?)
apm-integrations-next-gte.11.0.0.and.lt.13 30.74% <ø> (?)
apm-integrations-next-gte.13.0.0.and.lt.14 30.98% <ø> (?)
apm-integrations-oracledb 34.57% <ø> (-0.17%) ⬇️
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 34.96% <ø> (-1.77%) ⬇️
apm-integrations-prisma-latest-all ?
apm-integrations-restify 36.33% <ø> (-0.18%) ⬇️
apm-integrations-sharedb ?
apm-integrations-tedious 34.38% <ø> (-0.17%) ⬇️
appsec-express 51.90% <ø> (-0.07%) ⬇️
appsec-fastify 48.62% <ø> (-0.05%) ⬇️
appsec-graphql 48.99% <ø> (-0.01%) ⬇️
appsec-integration-active ?
appsec-integration-latest 36.90% <ø> (+0.13%) ⬆️
appsec-integration-maintenance ?
appsec-integration-oldest ?
appsec-kafka 41.45% <ø> (-0.20%) ⬇️
appsec-ldapjs 40.65% <ø> (-0.13%) ⬇️
appsec-lodash 40.76% <ø> (-0.13%) ⬇️
appsec-macos 55.75% <ø> (+0.07%) ⬆️
appsec-mongodb-core 45.10% <ø> (-0.09%) ⬇️
appsec-mongoose 45.95% <ø> (-0.08%) ⬇️
appsec-mysql 47.99% <ø> (-0.10%) ⬇️
appsec-next-latest-11.1.4 ?
appsec-next-latest-12.3.7 ?
appsec-next-latest-13.0.0 ?
appsec-next-latest-13.2.0 30.87% <ø> (-0.11%) ⬇️
appsec-next-latest-13.5.11 ?
appsec-next-latest-14.0.0 ?
appsec-next-latest-14.2.35 ?
appsec-next-latest-14.2.6 ?
appsec-next-latest-14.2.7 ?
appsec-next-latest-15.0.0 ?
appsec-next-latest-gte.10.2.0.and.lt.11 28.75% <ø> (?)
appsec-next-latest-gte.11.0.0.and.lt.13 30.86% <ø> (?)
appsec-next-latest-gte.13.0.0.and.lt.14 31.11% <ø> (?)
appsec-next-latest-gte.14.0.0.and.lte.14.2.6 30.95% <ø> (?)
appsec-next-latest-gte.14.2.7.and.lt.15 30.95% <ø> (?)
appsec-next-latest-gte.15.0.0 30.95% <ø> (?)
appsec-next-latest-latest ?
appsec-next-oldest-11.1.4 29.18% <ø> (-0.10%) ⬇️
appsec-next-oldest-12.3.7 ?
appsec-next-oldest-13.0.0 ?
appsec-next-oldest-13.2.0 31.15% <ø> (-0.12%) ⬇️
appsec-next-oldest-13.5.11 ?
appsec-next-oldest-14.0.0 ?
appsec-next-oldest-14.2.35 ?
appsec-next-oldest-14.2.6 ?
appsec-next-oldest-14.2.7 ?
appsec-next-oldest-15.0.0 ?
appsec-next-oldest-gte.10.2.0.and.lt.11 28.87% <ø> (?)
appsec-next-oldest-gte.11.0.0.and.lt.13 30.87% <ø> (?)
appsec-next-oldest-latest ?
appsec-node-serialize 39.98% <ø> (-0.13%) ⬇️
appsec-passport 43.63% <ø> (-0.18%) ⬇️
appsec-postgres 47.54% <ø> (-0.12%) ⬇️
appsec-sourcing 39.32% <ø> (-0.14%) ⬇️
appsec-stripe 41.42% <ø> (-0.20%) ⬇️
appsec-template 40.14% <ø> (-0.13%) ⬇️
appsec-ubuntu ?
appsec-windows ?
debugger-ubuntu-active ?
debugger-ubuntu-latest ?
debugger-ubuntu-maintenance ?
debugger-ubuntu-oldest ?
instrumentations-instrumentation-bluebird 29.27% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-body-parser 36.87% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-child_process 34.75% <ø> (-0.21%) ⬇️
instrumentations-instrumentation-cookie-parser 31.11% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express 31.32% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.23% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-express-session 36.56% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-fs 28.96% <ø> (-0.13%) ⬇️
instrumentations-instrumentation-generic-pool 29.89% <ø> (+0.67%) ⬆️
instrumentations-instrumentation-http 36.23% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-knex 29.24% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-light-my-request 36.49% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-mongoose 30.37% <ø> (-0.11%) ⬇️
instrumentations-instrumentation-multer 36.66% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-mysql2 34.79% <ø> (-0.18%) ⬇️
instrumentations-instrumentation-passport 40.28% <ø> (-0.20%) ⬇️
instrumentations-instrumentation-passport-http 40.05% <ø> (-0.20%) ⬇️
instrumentations-instrumentation-passport-local 40.54% <ø> (-0.20%) ⬇️
instrumentations-instrumentation-pg 34.34% <ø> (-0.22%) ⬇️
instrumentations-instrumentation-promise 29.21% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-promise-js 29.21% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-q 29.24% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-url 29.21% <ø> (-0.12%) ⬇️
instrumentations-instrumentation-when 29.22% <ø> (-0.12%) ⬇️
instrumentations-integration-esbuild-0.16.12-active ?
instrumentations-integration-esbuild-0.16.12-latest ?
instrumentations-integration-esbuild-0.16.12-maintenance ?
instrumentations-integration-esbuild-0.16.12-oldest ?
instrumentations-integration-esbuild-latest-active ?
instrumentations-integration-esbuild-latest-latest ?
instrumentations-integration-esbuild-latest-maintenance ?
instrumentations-integration-esbuild-latest-oldest ?
llmobs-ai ?
llmobs-anthropic 37.76% <ø> (-0.16%) ⬇️
llmobs-bedrock 36.45% <ø> (-0.18%) ⬇️
llmobs-google-genai 36.78% <ø> (-0.16%) ⬇️
llmobs-langchain 38.07% <ø> (-0.15%) ⬇️
llmobs-openai-latest ?
llmobs-openai-oldest ?
llmobs-sdk-active ?
llmobs-sdk-latest 45.26% <ø> (-0.18%) ⬇️
llmobs-sdk-maintenance 45.33% <ø> (-0.18%) ⬇️
llmobs-sdk-oldest 45.31% <ø> (-0.18%) ⬇️
llmobs-vertex-ai ?
openfeature-macos ?
openfeature-ubuntu 38.01% <ø> (-0.13%) ⬇️
openfeature-unit-active 48.32% <ø> (-0.92%) ⬇️
openfeature-unit-latest 48.16% <ø> (-0.92%) ⬇️
openfeature-unit-maintenance 48.32% <ø> (-0.92%) ⬇️
openfeature-unit-oldest 48.32% <ø> (-0.92%) ⬇️
openfeature-windows ?
platform-core 37.01% <ø> (+0.77%) ⬆️
platform-esbuild 40.36% <ø> (+0.72%) ⬆️
platform-instrumentations-misc 30.70% <ø> (-0.22%) ⬇️
platform-integration-active ?
platform-integration-latest ?
platform-integration-maintenance ?
platform-integration-oldest ?
platform-shimmer 42.09% <ø> (+0.60%) ⬆️
platform-unit-guardrails 35.93% <ø> (+0.55%) ⬆️
platform-webpack ?
plugins-aws-durable-execution-sdk-js ?
plugins-azure-durable-functions ?
plugins-azure-event-hubs 34.76% <ø> (-0.16%) ⬇️
plugins-azure-service-bus 35.23% <ø> (-0.14%) ⬇️
plugins-bullmq ?
plugins-cassandra 34.72% <ø> (-0.04%) ⬇️
plugins-cookie 27.32% <ø> (-2.01%) ⬇️
plugins-cookie-parser 27.12% <ø> (-2.01%) ⬇️
plugins-crypto 27.52% <ø> (+0.49%) ⬆️
plugins-dd-trace-api 34.68% <ø> (-0.17%) ⬇️
plugins-express-mongo-sanitize ?
plugins-express-session 27.08% <ø> (-2.01%) ⬇️
plugins-fastify 38.63% <ø> (-0.17%) ⬇️
plugins-fetch 34.96% <ø> (-0.16%) ⬇️
plugins-fs 35.03% <ø> (-0.21%) ⬇️
plugins-generic-pool ?
plugins-google-cloud-pubsub ?
plugins-grpc 37.41% <ø> (-0.20%) ⬇️
plugins-handlebars 27.29% <ø> (-1.99%) ⬇️
plugins-hapi 36.66% <ø> (-0.05%) ⬇️
plugins-hono 36.82% <ø> (-0.18%) ⬇️
plugins-ioredis 35.11% <ø> (-0.22%) ⬇️
plugins-knex 26.94% <ø> (-1.92%) ⬇️
plugins-langgraph 34.39% <ø> (-0.20%) ⬇️
plugins-ldapjs 24.86% <ø> (-2.04%) ⬇️
plugins-light-my-request 26.71% <ø> (-1.98%) ⬇️
plugins-limitd-client 29.51% <ø> (-0.12%) ⬇️
plugins-lodash 26.33% <ø> (-2.06%) ⬇️
plugins-mariadb ?
plugins-memcached 34.76% <ø> (-0.19%) ⬇️
plugins-microgateway-core 35.66% <ø> (-0.19%) ⬇️
plugins-modelcontextprotocol-sdk 33.67% <ø> (-0.21%) ⬇️
plugins-moleculer 37.48% <ø> (-0.15%) ⬇️
plugins-mongodb-core 35.67% <ø> (-0.25%) ⬇️
plugins-mongoose 35.47% <ø> (-0.18%) ⬇️
plugins-multer 27.08% <ø> (-2.01%) ⬇️
plugins-mysql 35.61% <ø> (-0.36%) ⬇️
plugins-mysql2 35.83% <ø> (-0.22%) ⬇️
plugins-node-serialize 27.36% <ø> (-2.01%) ⬇️
plugins-opensearch 34.46% <ø> (-0.17%) ⬇️
plugins-passport-http 27.13% <ø> (-1.98%) ⬇️
plugins-pino 31.21% <ø> (-0.12%) ⬇️
plugins-postgres 33.83% <ø> (-0.19%) ⬇️
plugins-process 27.52% <ø> (+0.49%) ⬆️
plugins-pug 27.32% <ø> (-2.01%) ⬇️
plugins-redis 35.16% <ø> (-0.16%) ⬇️
plugins-router 38.98% <ø> (-0.16%) ⬇️
plugins-sequelize 26.03% <ø> (-2.06%) ⬇️
plugins-test-and-upstream-amqp10 35.01% <ø> (-0.18%) ⬇️
plugins-test-and-upstream-amqplib 40.23% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-apollo 35.87% <ø> (-0.24%) ⬇️
plugins-test-and-upstream-avsc 34.35% <ø> (-0.21%) ⬇️
plugins-test-and-upstream-bunyan ?
plugins-test-and-upstream-connect ?
plugins-test-and-upstream-graphql 36.78% <ø> (-0.37%) ⬇️
plugins-test-and-upstream-koa 36.79% <ø> (-0.18%) ⬇️
plugins-test-and-upstream-protobufjs 34.56% <ø> (-0.21%) ⬇️
plugins-test-and-upstream-rhea 40.24% <ø> (-0.12%) ⬇️
plugins-undici 35.69% <ø> (-0.15%) ⬇️
plugins-url 27.52% <ø> (+0.49%) ⬆️
plugins-valkey 34.77% <ø> (-0.20%) ⬇️
plugins-vm 27.52% <ø> (+0.49%) ⬆️
plugins-winston 31.10% <ø> (-0.10%) ⬇️
plugins-ws 38.31% <ø> (-0.17%) ⬇️
profiling-macos 42.66% <ø> (-0.09%) ⬇️
profiling-ubuntu ?
profiling-windows 39.97% <ø> (-0.11%) ⬇️
serverless-aws-sdk-latest-aws-sdk ?
serverless-aws-sdk-latest-bedrockruntime 33.01% <ø> (-0.18%) ⬇️
serverless-aws-sdk-latest-client 22.99% <ø> (-1.93%) ⬇️
serverless-aws-sdk-latest-dynamodb 35.63% <ø> (-0.15%) ⬇️
serverless-aws-sdk-latest-eventbridge 28.78% <ø> (+0.01%) ⬆️
serverless-aws-sdk-latest-kinesis ?
serverless-aws-sdk-latest-lambda 35.81% <ø> (-0.14%) ⬇️
serverless-aws-sdk-latest-s3 33.78% <ø> (-0.16%) ⬇️
serverless-aws-sdk-latest-serverless-peer-service ?
serverless-aws-sdk-latest-sns 39.66% <ø> (-0.10%) ⬇️
serverless-aws-sdk-latest-sqs 38.94% <ø> (-0.10%) ⬇️
serverless-aws-sdk-latest-stepfunctions 34.40% <ø> (-0.16%) ⬇️
serverless-aws-sdk-latest-util ?
serverless-aws-sdk-oldest-aws-sdk ?
serverless-aws-sdk-oldest-bedrockruntime 33.29% <ø> (-0.18%) ⬇️
serverless-aws-sdk-oldest-client 23.35% <ø> (-1.91%) ⬇️
serverless-aws-sdk-oldest-dynamodb ?
serverless-aws-sdk-oldest-eventbridge 28.82% <ø> (+0.01%) ⬆️
serverless-aws-sdk-oldest-kinesis ?
serverless-aws-sdk-oldest-lambda ?
serverless-aws-sdk-oldest-s3 33.84% <ø> (-0.16%) ⬇️
serverless-aws-sdk-oldest-serverless-peer-service 39.99% <ø> (-0.11%) ⬇️
serverless-aws-sdk-oldest-sns ?
serverless-aws-sdk-oldest-sqs ?
serverless-aws-sdk-oldest-stepfunctions 34.47% <ø> (-0.16%) ⬇️
serverless-aws-sdk-oldest-util 47.66% <ø> (-0.92%) ⬇️
serverless-azure-functions-eventhubs ?
serverless-azure-functions-servicebus ?
serverless-lambda 32.78% <ø> (-1.76%) ⬇️
test-optimization-cucumber-latest-7.0.0 ?
test-optimization-cucumber-latest-latest ?
test-optimization-cucumber-oldest-7.0.0 ?
test-optimization-cypress-latest-12.0.0-commonJS 43.52% <ø> (-5.16%) ⬇️
test-optimization-cypress-latest-12.0.0-esm 43.47% <ø> (-5.24%) ⬇️
test-optimization-cypress-latest-14.5.4-commonJS 42.95% <ø> (-5.57%) ⬇️
test-optimization-cypress-latest-14.5.4-esm 42.76% <ø> (-5.79%) ⬇️
test-optimization-cypress-latest-latest-commonJS 43.02% <ø> (-6.00%) ⬇️
test-optimization-cypress-latest-latest-esm 43.15% <ø> (-5.89%) ⬇️
test-optimization-cypress-oldest-12.0.0-commonJS 43.14% <ø> (-5.57%) ⬇️
test-optimization-cypress-oldest-12.0.0-esm 42.95% <ø> (-5.79%) ⬇️
test-optimization-cypress-oldest-14.5.4-commonJS 42.99% <ø> (-5.57%) ⬇️
test-optimization-cypress-oldest-14.5.4-esm 43.35% <ø> (-5.24%) ⬇️
test-optimization-jest-latest-latest ?
test-optimization-jest-latest-oldest ?
test-optimization-jest-oldest-latest 54.81% <ø> (+2.50%) ⬆️
test-optimization-jest-oldest-oldest 49.00% <ø> (-4.51%) ⬇️
test-optimization-mocha-latest-latest ?
test-optimization-mocha-latest-oldest 50.94% <ø> (-0.06%) ⬇️
test-optimization-mocha-oldest-latest ?
test-optimization-mocha-oldest-oldest ?
test-optimization-playwright-latest-latest-playwright-active-test-span 44.19% <ø> (-0.04%) ⬇️
test-optimization-playwright-latest-latest-playwright-atr ?
test-optimization-playwright-latest-latest-playwright-efd ?
test-optimization-playwright-latest-latest-playwright-final-status ?
test-optimization-playwright-latest-latest-playwright-impacted-tests 42.94% <ø> (+<0.01%) ⬆️
test-optimization-playwright-latest-latest-playwright-reporting ?
test-optimization-playwright-latest-latest-playwright-test-management ?
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.26% <ø> (-0.04%) ⬇️
test-optimization-playwright-latest-oldest-playwright-atr ?
test-optimization-playwright-latest-oldest-playwright-efd ?
test-optimization-playwright-latest-oldest-playwright-final-status ?
test-optimization-playwright-latest-oldest-playwright-impacted-tests 42.99% <ø> (+<0.01%) ⬆️
test-optimization-playwright-latest-oldest-playwright-reporting 42.49% <ø> (-0.46%) ⬇️
test-optimization-playwright-latest-oldest-playwright-test-management ?
test-optimization-playwright-oldest-latest-playwright-active-test-span 44.21% <ø> (-0.07%) ⬇️
test-optimization-playwright-oldest-latest-playwright-atr ?
test-optimization-playwright-oldest-latest-playwright-efd ?
test-optimization-playwright-oldest-latest-playwright-final-status ?
test-optimization-playwright-oldest-latest-playwright-impacted-tests ?
test-optimization-playwright-oldest-latest-playwright-reporting ?
test-optimization-playwright-oldest-latest-playwright-test-management ?
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.30% <ø> (-0.04%) ⬇️
test-optimization-playwright-oldest-oldest-playwright-atr 43.26% <ø> (+<0.01%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-efd ?
test-optimization-playwright-oldest-oldest-playwright-final-status ?
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 43.02% <ø> (+<0.01%) ⬆️
test-optimization-playwright-oldest-oldest-playwright-reporting ?
test-optimization-playwright-oldest-oldest-playwright-test-management ?
test-optimization-selenium-latest ?
test-optimization-selenium-oldest 45.13% <ø> (+0.06%) ⬆️
test-optimization-testopt-active 46.98% <ø> (+0.10%) ⬆️
test-optimization-testopt-latest 46.94% <ø> (+0.10%) ⬆️
test-optimization-testopt-maintenance 46.98% <ø> (+0.10%) ⬆️
test-optimization-testopt-oldest 47.85% <ø> (+0.11%) ⬆️
test-optimization-vitest-latest 46.36% <ø> (-4.60%) ⬇️
test-optimization-vitest-oldest 41.87% <ø> (-6.11%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@joeyzhao2018 joeyzhao2018 force-pushed the joey/cross-invocation-tracecontext-propagation branch 2 times, most recently from da775cf to d2bb910 Compare May 13, 2026 22:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 94.49541% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.76%. Comparing base (531d682) to head (9a25134).

Files with missing lines Patch % Lines
...s-durable-execution-sdk-js/src/trace-checkpoint.js 92.20% 6 Missing ⚠️
Additional details and impacted files
@@                                 Coverage Diff                                  @@
##           joey/apm-ai-toolkit/aws-durable-execution-sdk-js    #8182      +/-   ##
====================================================================================
- Coverage                                             89.79%   89.76%   -0.03%     
====================================================================================
  Files                                                   852      853       +1     
  Lines                                                 45911    46020     +109     
  Branches                                               8534     8533       -1     
====================================================================================
+ Hits                                                  41225    41310      +85     
- Misses                                                 4686     4710      +24     
Flag Coverage Δ
aiguard-integration-active 41.27% <ø> (ø)
aiguard-integration-latest 41.22% <ø> (ø)
aiguard-integration-maintenance 41.27% <ø> (ø)
aiguard-macos 35.01% <ø> (ø)
aiguard-ubuntu 35.11% <ø> (ø)
aiguard-windows 34.88% <ø> (ø)
apm-capabilities-tracing-macos 48.83% <10.09%> (-0.15%) ⬇️
apm-capabilities-tracing-ubuntu-active 48.85% <10.09%> (-0.15%) ⬇️
apm-capabilities-tracing-ubuntu-latest 49.00% <10.09%> (+0.02%) ⬆️
apm-capabilities-tracing-ubuntu-maintenance 48.85% <10.09%> (-0.15%) ⬇️
apm-capabilities-tracing-ubuntu-oldest 48.84% <10.09%> (-0.33%) ⬇️
apm-capabilities-tracing-windows 48.82% <10.09%> (-0.15%) ⬇️
apm-integrations-aerospike-18-gte.5.2.0 34.45% <ø> (ø)
apm-integrations-aerospike-20-gte.5.5.0 34.47% <ø> (ø)
apm-integrations-aerospike-22-gte.5.12.1 34.47% <ø> (ø)
apm-integrations-aerospike-22-gte.6.0.0 34.47% <ø> (ø)
apm-integrations-aerospike-eol- 34.38% <ø> (ø)
apm-integrations-child-process 35.52% <ø> (ø)
apm-integrations-confluentinc-kafka-javascript-18 41.33% <ø> (ø)
apm-integrations-confluentinc-kafka-javascript-20 41.35% <ø> (ø)
apm-integrations-confluentinc-kafka-javascript-22 41.35% <ø> (ø)
apm-integrations-confluentinc-kafka-javascript-24 41.28% <ø> (ø)
apm-integrations-couchbase-18 34.63% <ø> (+0.13%) ⬆️
apm-integrations-couchbase-eol 34.52% <ø> (ø)
apm-integrations-dns 34.30% <ø> (ø)
apm-integrations-elasticsearch 35.24% <ø> (ø)
apm-integrations-http-latest 42.19% <ø> (ø)
apm-integrations-http-maintenance 42.25% <ø> (ø)
apm-integrations-http-oldest 42.27% <ø> (+0.01%) ⬆️
apm-integrations-http2 39.53% <ø> (+0.02%) ⬆️
apm-integrations-kafkajs-latest 41.14% <ø> (+0.10%) ⬆️
apm-integrations-kafkajs-oldest 41.19% <ø> (+0.11%) ⬆️
apm-integrations-net 35.19% <ø> (ø)
apm-integrations-next-11.1.4 29.16% <ø> (-0.03%) ⬇️
apm-integrations-next-12.3.7 30.83% <ø> (ø)
apm-integrations-next-13.0.0 30.83% <ø> (ø)
apm-integrations-next-13.2.0 30.82% <ø> (ø)
apm-integrations-next-13.5.11 30.95% <ø> (ø)
apm-integrations-next-14.0.0 30.89% <ø> (ø)
apm-integrations-next-14.2.35 30.89% <ø> (ø)
apm-integrations-next-14.2.6 30.92% <ø> (+0.02%) ⬆️
apm-integrations-next-14.2.7 30.89% <ø> (ø)
apm-integrations-next-15.0.0 30.89% <ø> (-0.03%) ⬇️
apm-integrations-next-15.4.0 30.95% <ø> (ø)
apm-integrations-oracledb 34.80% <ø> (ø)
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 36.76% <ø> (ø)
apm-integrations-prisma-latest-all 35.58% <ø> (ø)
apm-integrations-restify 36.55% <ø> (ø)
apm-integrations-sharedb 34.02% <ø> (ø)
apm-integrations-tedious 34.60% <ø> (ø)
appsec-express 52.13% <ø> (-0.02%) ⬇️
appsec-fastify 48.88% <ø> (ø)
appsec-graphql 48.96% <ø> (ø)
appsec-integration-active 37.06% <ø> (ø)
appsec-integration-latest 37.03% <ø> (ø)
appsec-integration-maintenance 37.07% <ø> (ø)
appsec-integration-oldest 37.06% <ø> (ø)
appsec-kafka 41.62% <ø> (-0.05%) ⬇️
appsec-ldapjs 40.87% <ø> (ø)
appsec-lodash 40.95% <ø> (ø)
appsec-macos 58.15% <ø> (ø)
appsec-mongodb-core 45.35% <ø> (-0.08%) ⬇️
appsec-mongoose 46.31% <ø> (-0.02%) ⬇️
appsec-mysql 48.25% <ø> (+0.04%) ⬆️
appsec-next-latest-11.1.4 29.29% <ø> (ø)
appsec-next-latest-12.3.7 30.96% <ø> (ø)
appsec-next-latest-13.0.0 30.96% <ø> (ø)
appsec-next-latest-13.2.0 30.98% <ø> (ø)
appsec-next-latest-13.5.11 31.06% <ø> (ø)
appsec-next-latest-14.0.0 31.00% <ø> (ø)
appsec-next-latest-14.2.35 31.00% <ø> (ø)
appsec-next-latest-14.2.6 31.00% <ø> (ø)
appsec-next-latest-14.2.7 31.00% <ø> (ø)
appsec-next-latest-15.0.0 31.00% <ø> (ø)
appsec-next-latest-latest 31.00% <ø> (ø)
appsec-next-oldest-11.1.4 29.36% <ø> (+0.05%) ⬆️
appsec-next-oldest-12.3.7 30.98% <ø> (ø)
appsec-next-oldest-13.0.0 30.98% <ø> (ø)
appsec-next-oldest-13.2.0 31.26% <ø> (ø)
appsec-next-oldest-13.5.11 31.35% <ø> (ø)
appsec-next-oldest-14.0.0 31.29% <ø> (ø)
appsec-next-oldest-14.2.35 31.29% <ø> (ø)
appsec-next-oldest-14.2.6 31.29% <ø> (ø)
appsec-next-oldest-14.2.7 31.29% <ø> (ø)
appsec-next-oldest-15.0.0 31.29% <ø> (ø)
appsec-next-oldest-latest 30.21% <ø> (ø)
appsec-node-serialize 40.17% <ø> (ø)
appsec-passport 43.99% <ø> (ø)
appsec-postgres 47.88% <ø> (ø)
appsec-sourcing 39.57% <ø> (ø)
appsec-stripe 41.79% <ø> (ø)
appsec-template 40.43% <ø> (ø)
appsec-ubuntu 58.22% <ø> (ø)
appsec-windows 58.12% <ø> (+0.08%) ⬆️
debugger-ubuntu-active 43.31% <ø> (ø)
debugger-ubuntu-latest 43.26% <ø> (ø)
debugger-ubuntu-maintenance 43.33% <ø> (ø)
debugger-ubuntu-oldest 43.76% <ø> (ø)
instrumentations-instrumentation-bluebird 29.40% <ø> (ø)
instrumentations-instrumentation-body-parser 37.13% <ø> (ø)
instrumentations-instrumentation-child_process 34.93% <ø> (ø)
instrumentations-instrumentation-cookie-parser 31.30% <ø> (ø)
instrumentations-instrumentation-express 31.51% <ø> (ø)
instrumentations-instrumentation-express-mongo-sanitize 31.42% <ø> (ø)
instrumentations-instrumentation-express-session 36.83% <ø> (ø)
instrumentations-instrumentation-fs 29.08% <ø> (ø)
instrumentations-instrumentation-generic-pool 28.75% <ø> (ø)
instrumentations-instrumentation-http 36.33% <ø> (ø)
instrumentations-instrumentation-knex 29.37% <ø> (ø)
instrumentations-instrumentation-light-my-request 36.71% <ø> (ø)
instrumentations-instrumentation-mongoose 30.67% <ø> (ø)
instrumentations-instrumentation-multer 36.81% <ø> (ø)
instrumentations-instrumentation-mysql2 34.93% <ø> (ø)
instrumentations-instrumentation-passport 40.57% <ø> (ø)
instrumentations-instrumentation-passport-http 40.24% <ø> (ø)
instrumentations-instrumentation-passport-local 40.72% <ø> (ø)
instrumentations-instrumentation-pg 34.48% <ø> (ø)
instrumentations-instrumentation-promise 29.33% <ø> (ø)
instrumentations-instrumentation-promise-js 29.34% <ø> (ø)
instrumentations-instrumentation-q 29.37% <ø> (ø)
instrumentations-instrumentation-url 29.30% <ø> (ø)
instrumentations-instrumentation-when 29.35% <ø> (ø)
instrumentations-integration-esbuild-0.16.12-active 19.29% <ø> (ø)
instrumentations-integration-esbuild-0.16.12-latest 19.27% <ø> (ø)
instrumentations-integration-esbuild-0.16.12-maintenance 19.29% <ø> (ø)
instrumentations-integration-esbuild-0.16.12-oldest 19.28% <ø> (ø)
instrumentations-integration-esbuild-latest-active 19.29% <ø> (ø)
instrumentations-integration-esbuild-latest-latest 19.27% <ø> (ø)
instrumentations-integration-esbuild-latest-maintenance 19.29% <ø> (ø)
instrumentations-integration-esbuild-latest-oldest 19.28% <ø> (ø)
llmobs-ai 37.86% <ø> (ø)
llmobs-anthropic 37.95% <ø> (ø)
llmobs-bedrock 36.58% <ø> (ø)
llmobs-google-genai 37.00% <ø> (ø)
llmobs-langchain 38.26% <ø> (ø)
llmobs-openai-latest 40.51% <ø> (ø)
llmobs-openai-oldest 40.55% <ø> (ø)
llmobs-sdk-active 45.03% <ø> (ø)
llmobs-sdk-latest 44.96% <ø> (ø)
llmobs-sdk-maintenance 45.03% <ø> (ø)
llmobs-sdk-oldest 45.01% <ø> (ø)
llmobs-vertex-ai 37.02% <ø> (ø)
master-coverage ?
openfeature-macos 38.10% <ø> (ø)
openfeature-ubuntu 38.17% <ø> (ø)
openfeature-unit-active 49.22% <ø> (ø)
openfeature-unit-latest 49.06% <ø> (ø)
openfeature-unit-maintenance 49.22% <ø> (ø)
openfeature-unit-oldest 49.22% <ø> (ø)
openfeature-windows 37.96% <ø> (ø)
platform-core 36.20% <ø> (ø)
platform-esbuild 39.58% <ø> (ø)
platform-instrumentations-misc 31.47% <ø> (ø)
platform-integration-active 47.26% <ø> (+0.01%) ⬆️
platform-integration-latest 47.17% <ø> (-0.05%) ⬇️
platform-integration-maintenance 47.21% <ø> (-0.05%) ⬇️
platform-integration-oldest 47.43% <ø> (ø)
platform-shimmer 42.06% <ø> (ø)
platform-unit-guardrails 35.25% <ø> (ø)
platform-webpack 20.43% <ø> (ø)
plugins-aws-durable-execution-sdk-js 35.86% <94.49%> (+1.11%) ⬆️
plugins-azure-event-hubs 34.92% <ø> (ø)
plugins-azure-service-bus 35.42% <ø> (ø)
plugins-bullmq 40.17% <ø> (-0.11%) ⬇️
plugins-cassandra 34.85% <ø> (ø)
plugins-cookie 28.31% <ø> (ø)
plugins-cookie-parser 28.03% <ø> (ø)
plugins-crypto 27.11% <ø> (ø)
plugins-dd-trace-api 34.75% <ø> (ø)
plugins-express-mongo-sanitize 28.21% <ø> (ø)
plugins-express-session 27.98% <ø> (ø)
plugins-fastify 38.87% <ø> (ø)
plugins-fetch 35.20% <ø> (ø)
plugins-fs 35.17% <ø> (ø)
plugins-generic-pool 26.84% <ø> (ø)
plugins-google-cloud-pubsub 42.39% <ø> (ø)
plugins-grpc 37.65% <ø> (ø)
plugins-handlebars 28.26% <ø> (ø)
plugins-hapi 36.78% <ø> (ø)
plugins-hono 37.08% <ø> (ø)
plugins-ioredis 35.40% <ø> (ø)
plugins-knex 27.73% <ø> (ø)
plugins-langgraph 34.59% <ø> (ø)
plugins-ldapjs 24.95% <ø> (ø)
plugins-light-my-request 27.44% <ø> (ø)
plugins-limitd-client 29.63% <ø> (ø)
plugins-lodash 26.96% <ø> (ø)
plugins-mariadb 36.28% <ø> (ø)
plugins-memcached 34.90% <ø> (ø)
plugins-microgateway-core 35.91% <ø> (ø)
plugins-modelcontextprotocol-sdk 33.86% <ø> (ø)
plugins-moleculer 37.67% <ø> (ø)
plugins-mongodb 36.31% <ø> (+0.10%) ⬆️
plugins-mongodb-core 35.93% <ø> (ø)
plugins-mongoose 35.74% <ø> (ø)
plugins-multer 27.98% <ø> (ø)
plugins-mysql 35.77% <ø> (-0.01%) ⬇️
plugins-mysql2 35.93% <ø> (ø)
plugins-node-serialize 28.37% <ø> (ø)
plugins-opensearch 34.74% <ø> (ø)
plugins-passport-http 28.02% <ø> (ø)
plugins-pino 31.38% <ø> (ø)
plugins-postgres 35.60% <ø> (ø)
plugins-process 27.11% <ø> (ø)
plugins-pug 28.31% <ø> (ø)
plugins-redis 35.44% <ø> (+0.05%) ⬆️
plugins-router 39.27% <ø> (ø)
plugins-sequelize 26.55% <ø> (ø)
plugins-test-and-upstream-amqp10 35.10% <ø> (ø)
plugins-test-and-upstream-amqplib 40.18% <ø> (ø)
plugins-test-and-upstream-apollo 36.09% <ø> (ø)
plugins-test-and-upstream-avsc 35.31% <ø> (ø)
plugins-test-and-upstream-bunyan 30.76% <ø> (ø)
plugins-test-and-upstream-connect 37.47% <ø> (ø)
plugins-test-and-upstream-graphql 37.14% <ø> (+0.02%) ⬆️
plugins-test-and-upstream-koa 37.05% <ø> (ø)
plugins-test-and-upstream-protobufjs 35.51% <ø> (ø)
plugins-test-and-upstream-rhea 40.28% <ø> (ø)
plugins-undici 35.77% <ø> (ø)
plugins-url 27.11% <ø> (ø)
plugins-valkey 35.04% <ø> (-0.01%) ⬇️
plugins-vm 27.11% <ø> (ø)
plugins-winston 31.28% <ø> (ø)
plugins-ws 38.29% <ø> (ø)
profiling-macos 42.84% <ø> (+0.04%) ⬆️
profiling-ubuntu 43.20% <ø> (ø)
profiling-windows 40.09% <ø> (ø)
serverless-aws-sdk-latest-aws-sdk 34.51% <ø> (-0.01%) ⬇️
serverless-aws-sdk-latest-bedrockruntime 33.12% <ø> (ø)
serverless-aws-sdk-latest-client 22.53% <ø> (ø)
serverless-aws-sdk-latest-dynamodb 35.49% <ø> (-0.06%) ⬇️
serverless-aws-sdk-latest-eventbridge 28.64% <ø> (ø)
serverless-aws-sdk-latest-kinesis 38.63% <ø> (ø)
serverless-aws-sdk-latest-lambda 36.07% <ø> (ø)
serverless-aws-sdk-latest-s3 34.02% <ø> (ø)
serverless-aws-sdk-latest-serverless-peer-service 40.69% <ø> (ø)
serverless-aws-sdk-latest-sns 39.74% <ø> (ø)
serverless-aws-sdk-latest-sqs 39.24% <ø> (ø)
serverless-aws-sdk-latest-stepfunctions 34.69% <ø> (ø)
serverless-aws-sdk-latest-util 48.28% <ø> (ø)
serverless-aws-sdk-oldest-aws-sdk 34.60% <ø> (ø)
serverless-aws-sdk-oldest-bedrockruntime 33.40% <ø> (ø)
serverless-aws-sdk-oldest-client 23.00% <ø> (ø)
serverless-aws-sdk-oldest-dynamodb 35.57% <ø> (-0.06%) ⬇️
serverless-aws-sdk-oldest-eventbridge 28.69% <ø> (ø)
serverless-aws-sdk-oldest-kinesis 38.76% <ø> (ø)
serverless-aws-sdk-oldest-lambda 36.15% <ø> (ø)
serverless-aws-sdk-oldest-s3 34.09% <ø> (ø)
serverless-aws-sdk-oldest-serverless-peer-service 40.75% <ø> (ø)
serverless-aws-sdk-oldest-sns 39.82% <ø> (ø)
serverless-aws-sdk-oldest-sqs 39.13% <ø> (ø)
serverless-aws-sdk-oldest-stepfunctions 34.77% <ø> (ø)
serverless-aws-sdk-oldest-util 48.58% <ø> (ø)
serverless-azure-durable-functions 36.94% <ø> (ø)
serverless-azure-functions-eventhubs 38.57% <ø> (ø)
serverless-azure-functions-servicebus 38.63% <ø> (ø)
serverless-lambda 36.13% <ø> (ø)
test-optimization-cucumber-latest-7.0.0 50.33% <ø> (ø)
test-optimization-cucumber-latest-latest 53.21% <ø> (ø)
test-optimization-cucumber-oldest-7.0.0 50.37% <ø> (ø)
test-optimization-cypress-latest-12.0.0-commonJS 48.81% <ø> (ø)
test-optimization-cypress-latest-12.0.0-esm 48.84% <ø> (ø)
test-optimization-cypress-latest-14.5.4-commonJS 48.66% <ø> (ø)
test-optimization-cypress-latest-14.5.4-esm 48.69% <ø> (ø)
test-optimization-cypress-latest-latest-commonJS 49.15% <ø> (ø)
test-optimization-cypress-latest-latest-esm 49.18% <ø> (-0.12%) ⬇️
test-optimization-cypress-oldest-12.0.0-commonJS 48.85% <ø> (ø)
test-optimization-cypress-oldest-12.0.0-esm 48.88% <ø> (ø)
test-optimization-cypress-oldest-14.5.4-commonJS 48.69% <ø> (ø)
test-optimization-cypress-oldest-14.5.4-esm 48.73% <ø> (ø)
test-optimization-jest-latest-latest 54.83% <ø> (-0.11%) ⬇️
test-optimization-jest-latest-oldest 53.63% <ø> (ø)
test-optimization-jest-oldest-latest 54.84% <ø> (ø)
test-optimization-jest-oldest-oldest 53.59% <ø> (ø)
test-optimization-mocha-latest-latest 53.64% <ø> (ø)
test-optimization-mocha-latest-oldest 51.30% <ø> (ø)
test-optimization-mocha-oldest-latest 53.73% <ø> (ø)
test-optimization-mocha-oldest-oldest 51.24% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-active-test-span 44.32% <ø> (-0.05%) ⬇️
test-optimization-playwright-latest-latest-playwright-atr 43.15% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-efd 43.57% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-final-status 43.62% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-impacted-tests 43.08% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-reporting 43.03% <ø> (ø)
test-optimization-playwright-latest-latest-playwright-test-management 44.80% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-active-test-span 44.38% <ø> (-0.05%) ⬇️
test-optimization-playwright-latest-oldest-playwright-atr 43.36% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-efd 43.60% <ø> (-0.03%) ⬇️
test-optimization-playwright-latest-oldest-playwright-final-status 43.68% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-impacted-tests 43.13% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-reporting 43.10% <ø> (ø)
test-optimization-playwright-latest-oldest-playwright-test-management 44.88% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-active-test-span 44.36% <ø> (-0.05%) ⬇️
test-optimization-playwright-oldest-latest-playwright-atr 43.18% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-efd 43.58% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-final-status 43.64% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-impacted-tests 43.12% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-reporting 43.04% <ø> (ø)
test-optimization-playwright-oldest-latest-playwright-test-management 44.81% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-active-test-span 44.42% <ø> (-0.05%) ⬇️
test-optimization-playwright-oldest-oldest-playwright-atr 43.40% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-efd 43.64% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-final-status 43.69% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-impacted-tests 43.17% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-reporting 43.12% <ø> (ø)
test-optimization-playwright-oldest-oldest-playwright-test-management 44.89% <ø> (ø)
test-optimization-selenium-latest 45.58% <ø> (ø)
test-optimization-selenium-oldest 45.15% <ø> (ø)
test-optimization-testopt-active 46.97% <ø> (ø)
test-optimization-testopt-latest 46.93% <ø> (ø)
test-optimization-testopt-maintenance 46.97% <ø> (ø)
test-optimization-testopt-oldest 47.85% <ø> (ø)
test-optimization-vitest-latest 51.23% <ø> (-0.03%) ⬇️
test-optimization-vitest-oldest 48.32% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@joeyzhao2018 joeyzhao2018 force-pushed the joey/cross-invocation-tracecontext-propagation branch from c4eca48 to 73fdb80 Compare May 19, 2026 19:19
@pablomartinezbernardo pablomartinezbernardo force-pushed the joey/apm-ai-toolkit/aws-durable-execution-sdk-js branch from 411cd56 to 4180be5 Compare May 20, 2026 10:06
…s-invocation continuity

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.

Files:
- src/handler.js: install a hook on the SDK's terminationManager.terminate
  inside bindStart. Save fires only for resumable reasons (PENDING_TERMINATION_REASONS
  allow-list mirrors the SDK's TerminationReason enum entries that result in
  Status: PENDING). Gated by DD_DURABLE_CROSS_INVOCATION_TRACING_ENABLED
  (default on; opt out with 'false'/'0').
- src/trace-checkpoint.js: NEW. Datadog-only header inject (private
  TextMapPropagator with tracePropagationStyle.inject = ['datadog'], shadows
  the live tracer config), dedup against prior _datadog_N op via
  JSON.stringify-after-stripping-x-datadog-parent-id, deterministic blake2b
  stepId so the save is idempotent within an execution.
- test/handler.checkpoint.spec.js: unit tests for the termination hook
  (pending vs non-pending reasons, env-var gate, idempotency, default reason).
- test/trace-checkpoint.spec.js: unit tests for the save module
  (queue START+SUCCEED before terminating, dedup on parent-id-only changes).
- test/index.spec.js: integration coverage for SDK safe-paths
  (single cycle, child-context, step-suspend-step).
- packages/dd-trace/src/config/supported-configurations.json and
  generated-config-types.d.ts: register DD_DURABLE_CROSS_INVOCATION_TRACING_ENABLED.
…merScheduler bug

Skip wait_for_callback (happy path) and the entire invoke describe block
(happy + error). All three fail deterministically in CI under
@aws/durable-execution-sdk-js-testing's current TimerScheduler, whose
hasScheduledFunction() undercounts in-flight scheduled functions and
trips the test orchestrator's "Cannot return PENDING status with no
pending operations." validation. Production (real AWS backend) is not
affected — the validation is mock-only.

Fix is open upstream as aws/aws-durable-execution-sdk-js#544; re-enable
these tests once a release containing it is pinned in
packages/dd-trace/test/plugins/versions/package.json.
…led guard

The guard was defensive against a "same terminationManager passed to
bindStart twice" scenario that cannot happen in the SDK as it stands —
each Lambda invocation calls initializeExecutionContext, which constructs
a fresh `new TerminationManager()`, so warm starts share the wrapper
closure but not the terminationManager instance. Removing the Symbol +
the guard + the explicit "twice across invocations" unit test that only
covered a contrived re-entry.

Drive-by: fix four pre-existing space-before-function-paren lint errors
in the same file.
…cute span, not its parent

Drop the `getParentSpanId` helper and inline the read directly during
`state` initialization. While inlining, switch the anchor from the
execute span's *parent* (typically `aws.lambda`'s id) to the execute
span's *own* id (`span.context().toSpanId()`).

Why anchor at the execute span:
- It's a span this integration owns and just created, so always defined
  and never depends on what upstream context happened to be active when
  `bindStart` fired.
- Topology becomes "resumed invocations are continuations of the first
  execute" — matching the user-facing model of a single durable
  execution. The old shape made resumes look like sibling Lambda
  invocations under whatever upstream span happened to be there.
- In the no-upstream case the old code already fell through to the
  propagator default (= execute span's own id) via `if (parentId)` —
  so this just makes the behavior consistent across environments.

Rename for clarity:
- `saveTraceContextCheckpointIfUpdated`'s `checkpointAnchorSpanId`
  parameter -> `firstExecutionSpanId`. JSDoc spells out it's only
  consulted on the very first save; once a prior `_datadog_{N}` exists,
  the function reuses that checkpoint's `x-datadog-parent-id` verbatim.
- The local `latestParentId` (the value carried forward across saves)
  -> `anchoredSpanId`, reflecting that it IS the anchor we've been
  using since the first save.
- handler.js's `state.parentSpanId` -> `state.firstExecutionSpanId`.

Note: dd-trace-py's `_resolve_override_parent_id` currently anchors at
the execute span's parent (matching the old JS behavior). A follow-up
should bring Python in line with this change so both languages produce
the same trace shape.
@joeyzhao2018 joeyzhao2018 force-pushed the joey/cross-invocation-tracecontext-propagation branch from 034a8f8 to 748a826 Compare May 20, 2026 16:22
…gainst TimerScheduler bug"

This reverts commit 748a826.
@joeyzhao2018 joeyzhao2018 changed the title cross-invocation tracecontext propagation feat(aws): cross-invocation tracecontext propagation May 20, 2026
@joeyzhao2018 joeyzhao2018 marked this pull request as ready for review May 20, 2026 19:15
@joeyzhao2018 joeyzhao2018 requested review from a team as code owners May 20, 2026 19:15
@joeyzhao2018 joeyzhao2018 requested review from BridgeAR and crysmags and removed request for a team May 20, 2026 19:15
Copy link
Copy Markdown

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

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: 7f6e5f5fe4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joeyzhao2018 joeyzhao2018 requested a review from rochdev May 20, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant