Skip to content

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

Open
joeyzhao2018 wants to merge 14 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 14 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

https://datadoghq.atlassian.net/browse/APMSVLS-493

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-29 19:40:08

Comparing candidate commit 719e757 in PR branch joey/cross-invocation-tracecontext-propagation with baseline commit 4fc8cb3 in branch joey/apm-ai-toolkit/aws-durable-execution-sdk-js.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1487 metrics, 106 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.88 MB
Deduped: 6.92 MB
No deduping: 6.92 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

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 8 Pipeline jobs failed

System Tests | main / End-to-end #18 / express5 18   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). AssertionError: ddsh field not found in SQL comment: SELECT version() at tests/integrations/test_dbm.py:432

🧪 1 Test failed

tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres.test_dbm_dynamic_service[express5] from system_tests_suite   View in Datadog (Fix with Cursor)
AssertionError: ddsh field not found in SQL comment: SELECT version()
assert None

self = <tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres object at 0x7f64326c5ca0>

    def test_dbm_dynamic_service(self):
        assert self.r.status_code == 200, f"Request: {self.r.request.url} wasn't successful."
    
        try:
            data = json.loads(self.r.text)
...

System Tests | main / End-to-end #19 / express4 19   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). 1 failed test. AssertionError: ddsh field not found in SQL comment: SELECT version() at tests/integrations/test_dbm.py:432.

🧪 1 Test failed

tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres.test_dbm_dynamic_service[express4] from system_tests_suite   View in Datadog (Fix with Cursor)
AssertionError: ddsh field not found in SQL comment: SELECT version()
assert None

self = <tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres object at 0x7f8421f8a540>

    def test_dbm_dynamic_service(self):
        assert self.r.status_code == 200, f"Request: {self.r.request.url} wasn't successful."
    
        try:
            data = json.loads(self.r.text)
...

System Tests | main / End-to-end #19 / fastify 19   View in Datadog   GitHub Actions

🔧 Fix in code (Fix with Cursor). 1 failed test. AssertionError: ddsh field not found in SQL comment: SELECT version()

🧪 1 Test failed

tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres.test_dbm_dynamic_service[fastify] from system_tests_suite   View in Datadog (Fix with Cursor)
AssertionError: ddsh field not found in SQL comment: SELECT version()
assert None

self = <tests.integrations.test_dbm.Test_Dbm_DynamicService_Postgres object at 0x7f5c5560c200>

    def test_dbm_dynamic_service(self):
        assert self.r.status_code == 200, f"Request: {self.r.request.url} wasn't successful."
    
        try:
            data = json.loads(self.r.text)
...

View all 8 failed jobs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 8.04%
Overall Coverage: 85.96% (-0.39%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 719e757 | 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 42.20%. Comparing base (4fc8cb3) to head (70d0466).

Additional details and impacted files
@@                                  Coverage Diff                                  @@
##           joey/apm-ai-toolkit/aws-durable-execution-sdk-js    #8182       +/-   ##
=====================================================================================
- Coverage                                             92.35%   42.20%   -50.15%     
=====================================================================================
  Files                                                   855      525      -330     
  Lines                                                 47391    31148    -16243     
  Branches                                               8523        0     -8523     
=====================================================================================
- Hits                                                  43766    13145    -30621     
- Misses                                                 3625    18003    +14378     
Flag Coverage Δ
aiguard-integration-active ?
aiguard-integration-latest ?
aiguard-integration-maintenance ?
aiguard-macos 33.59% <ø> (ø)
aiguard-ubuntu ?
aiguard-windows ?
apm-capabilities-tracing-macos ?
apm-capabilities-tracing-ubuntu-active ?
apm-capabilities-tracing-ubuntu-latest ?
apm-capabilities-tracing-ubuntu-maintenance ?
apm-capabilities-tracing-ubuntu-oldest ?
apm-capabilities-tracing-windows ?
apm-integrations-aerospike-18-gte.5.2.0 ?
apm-integrations-aerospike-20-gte.5.5.0 ?
apm-integrations-aerospike-22-gte.5.12.1 ?
apm-integrations-aerospike-22-gte.6.0.0 ?
apm-integrations-aerospike-eol- ?
apm-integrations-child-process ?
apm-integrations-confluentinc-kafka-javascript-18 ?
apm-integrations-confluentinc-kafka-javascript-20 ?
apm-integrations-confluentinc-kafka-javascript-22 ?
apm-integrations-confluentinc-kafka-javascript-24 ?
apm-integrations-couchbase-18 ?
apm-integrations-couchbase-eol ?
apm-integrations-dns ?
apm-integrations-elasticsearch ?
apm-integrations-http-latest ?
apm-integrations-http-maintenance ?
apm-integrations-http-oldest 41.53% <ø> (ø)
apm-integrations-http2 ?
apm-integrations-kafkajs-latest ?
apm-integrations-kafkajs-oldest ?
apm-integrations-net ?
apm-integrations-next-11.1.4 ?
apm-integrations-next-12.3.7 ?
apm-integrations-next-13.0.0 ?
apm-integrations-next-13.2.0 ?
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-oracledb ?
apm-integrations-prisma-18-gte.6.16.0.and.lt.7.0.0 ?
apm-integrations-prisma-latest-all ?
apm-integrations-restify ?
apm-integrations-sharedb 32.68% <ø> (ø)
apm-integrations-tedious ?
appsec-express ?
appsec-fastify ?
appsec-graphql ?
appsec-integration-active ?
appsec-integration-maintenance ?
appsec-integration-oldest ?
appsec-kafka ?
appsec-ldapjs 40.04% <ø> (ø)
appsec-lodash 40.15% <ø> (ø)
appsec-macos ?
appsec-mongodb-core ?
appsec-mongoose ?
appsec-mysql ?
appsec-next-latest-11.1.4 ?
appsec-next-latest-12.3.7 ?
appsec-next-latest-13.0.0 ?
appsec-next-latest-13.2.0 ?
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-latest ?
appsec-next-oldest-11.1.4 ?
appsec-next-oldest-12.3.7 ?
appsec-next-oldest-13.0.0 ?
appsec-next-oldest-13.2.0 ?
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-latest ?
appsec-node-serialize ?
appsec-passport 43.09% <ø> (ø)
appsec-postgres ?
appsec-sourcing ?
appsec-stripe ?
appsec-ubuntu ?
appsec-windows ?
debugger-ubuntu-active ?
debugger-ubuntu-latest ?
debugger-ubuntu-maintenance ?
debugger-ubuntu-oldest ?
instrumentations-instrumentation-ai 36.79% <ø> (ø)
instrumentations-instrumentation-aws-sdk ?
instrumentations-instrumentation-bluebird 27.85% <ø> (ø)
instrumentations-instrumentation-body-parser 36.04% <ø> (ø)
instrumentations-instrumentation-child_process 33.54% <ø> (ø)
instrumentations-instrumentation-cookie-parser ?
instrumentations-instrumentation-couchbase-18 ?
instrumentations-instrumentation-couchbase-eol ?
instrumentations-instrumentation-crypto 27.93% <ø> (ø)
instrumentations-instrumentation-express ?
instrumentations-instrumentation-express-mongo-sanitize ?
instrumentations-instrumentation-express-multi-version 21.07% <ø> (ø)
instrumentations-instrumentation-express-session 35.75% <ø> (ø)
instrumentations-instrumentation-fetch ?
instrumentations-instrumentation-fs ?
instrumentations-instrumentation-generic-pool ?
instrumentations-instrumentation-hono ?
instrumentations-instrumentation-http 35.27% <ø> (ø)
instrumentations-instrumentation-http-client-options ?
instrumentations-instrumentation-knex 27.84% <ø> (ø)
instrumentations-instrumentation-light-my-request ?
instrumentations-instrumentation-mongoose ?
instrumentations-instrumentation-multer ?
instrumentations-instrumentation-mysql2 ?
instrumentations-instrumentation-otel-sdk-trace 25.42% <ø> (ø)
instrumentations-instrumentation-passport ?
instrumentations-instrumentation-passport-http ?
instrumentations-instrumentation-passport-local ?
instrumentations-instrumentation-pg ?
instrumentations-instrumentation-promise 27.80% <ø> (ø)
instrumentations-instrumentation-promise-js ?
instrumentations-instrumentation-q ?
instrumentations-instrumentation-stripe ?
instrumentations-instrumentation-url 27.76% <ø> (ø)
instrumentations-instrumentation-when 27.81% <ø> (ø)
instrumentations-instrumentation-zlib 27.81% <ø> (ø)
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 ?
llmobs-bedrock ?
llmobs-google-genai ?
llmobs-langchain ?
llmobs-openai-latest ?
llmobs-openai-oldest ?
llmobs-sdk-latest ?
llmobs-sdk-oldest ?
llmobs-vertex-ai ?
master-coverage ?
openfeature-macos ?
openfeature-ubuntu ?
openfeature-unit-active 47.77% <ø> (ø)
openfeature-unit-latest 47.64% <ø> (ø)
openfeature-unit-maintenance 47.77% <ø> (ø)
openfeature-unit-oldest 47.77% <ø> (ø)
openfeature-windows ?
platform-core 32.03% <ø> (ø)
platform-esbuild 36.60% <ø> (ø)
platform-instrumentations-misc ?
platform-integration-active ?
platform-integration-latest ?
platform-integration-maintenance ?
platform-integration-oldest ?
platform-shimmer 39.43% <ø> (ø)
platform-unit-guardrails 32.86% <ø> (ø)
platform-webpack 18.80% <ø> (ø)
plugins-aws-durable-execution-sdk-js ?
plugins-axios ?
plugins-azure-cosmos ?
plugins-azure-event-hubs ?
plugins-azure-service-bus ?
plugins-body-parser ?
plugins-bullmq ?
plugins-cassandra ?
plugins-cookie 25.98% <ø> (ø)
plugins-cookie-parser ?
plugins-crypto ?
plugins-dd-trace-api 33.56% <ø> (ø)
plugins-express-mongo-sanitize 25.97% <ø> (ø)
plugins-express-session ?
plugins-fastify ?
plugins-fetch ?
plugins-fs ?
plugins-generic-pool ?
plugins-google-cloud-pubsub ?
plugins-handlebars ?
plugins-hapi ?
plugins-hono ?
plugins-ioredis ?
plugins-jest ?
plugins-knex ?
plugins-langgraph 33.14% <ø> (ø)
plugins-ldapjs ?
plugins-light-my-request 25.35% <ø> (ø)
plugins-lodash 24.87% <ø> (ø)
plugins-mariadb ?
plugins-microgateway-core ?
plugins-modelcontextprotocol-sdk ?
plugins-moleculer ?
plugins-mongodb ?
plugins-mongodb-core ?
plugins-mongoose ?
plugins-multer ?
plugins-mysql ?
plugins-mysql2 ?
plugins-node-serialize ?
plugins-opensearch ?
plugins-passport-http 25.59% <ø> (ø)
plugins-pino ?
plugins-postgres ?
plugins-process 24.82% <ø> (ø)
plugins-pug ?
plugins-redis ?
plugins-router ?
plugins-sequelize ?
plugins-test-and-upstream-amqp10 ?
plugins-test-and-upstream-amqplib ?
plugins-test-and-upstream-apollo ?
plugins-test-and-upstream-avsc 33.99% <ø> (ø)
plugins-test-and-upstream-bunyan ?
plugins-test-and-upstream-connect ?
plugins-test-and-upstream-graphql ?
plugins-test-and-upstream-koa ?
plugins-test-and-upstream-protobufjs 34.20% <ø> (ø)
plugins-test-and-upstream-rhea ?
plugins-undici 34.70% <ø> (ø)
plugins-url 24.82% <ø> (ø)
plugins-valkey ?
plugins-vm 24.82% <ø> (ø)
plugins-winston ?
plugins-ws 37.23% <ø> (ø)
profiling-macos ?
profiling-ubuntu ?
profiling-windows ?
serverless-aws-sdk-latest-bedrockruntime ?
serverless-aws-sdk-latest-client ?
serverless-aws-sdk-latest-eventbridge ?
serverless-aws-sdk-latest-kinesis ?
serverless-aws-sdk-latest-s3 ?
serverless-aws-sdk-latest-serverless-peer-service ?
serverless-aws-sdk-latest-sns ?
serverless-aws-sdk-latest-sqs ?
serverless-aws-sdk-latest-stepfunctions ?
serverless-aws-sdk-latest-util ?
serverless-aws-sdk-oldest-aws-sdk ?
serverless-aws-sdk-oldest-bedrockruntime ?
serverless-aws-sdk-oldest-client ?
serverless-aws-sdk-oldest-dynamodb ?
serverless-aws-sdk-oldest-eventbridge ?
serverless-aws-sdk-oldest-kinesis ?
serverless-aws-sdk-oldest-lambda ?
serverless-aws-sdk-oldest-s3 ?
serverless-aws-sdk-oldest-serverless-peer-service ?
serverless-aws-sdk-oldest-sns ?
serverless-aws-sdk-oldest-sqs ?
serverless-aws-sdk-oldest-stepfunctions ?
serverless-aws-sdk-oldest-util ?
serverless-azure-durable-functions ?
serverless-azure-functions-eventhubs ?
serverless-azure-functions-servicebus ?
serverless-lambda ?
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 ?
test-optimization-cypress-latest-12.0.0-esm ?
test-optimization-cypress-latest-14.5.4-commonJS ?
test-optimization-cypress-latest-14.5.4-esm ?
test-optimization-cypress-latest-latest-commonJS ?
test-optimization-cypress-latest-latest-esm ?
test-optimization-cypress-oldest-12.0.0-commonJS ?
test-optimization-cypress-oldest-12.0.0-esm ?
test-optimization-cypress-oldest-14.5.4-commonJS ?
test-optimization-cypress-oldest-14.5.4-esm ?
test-optimization-jest-latest-latest ?
test-optimization-jest-latest-oldest ?
test-optimization-jest-oldest-latest ?
test-optimization-jest-oldest-oldest ?
test-optimization-mocha-latest-latest ?
test-optimization-mocha-latest-oldest ?
test-optimization-mocha-oldest-latest ?
test-optimization-mocha-oldest-oldest ?
test-optimization-playwright-latest-latest-playwright-active-test-span ?
test-optimization-playwright-latest-latest-playwright-atr ?
test-optimization-playwright-latest-latest-playwright-final-status ?
test-optimization-playwright-latest-latest-playwright-impacted-tests ?
test-optimization-playwright-latest-latest-playwright-reporting ?
test-optimization-playwright-latest-latest-playwright-test-management ?
test-optimization-playwright-latest-oldest-playwright-active-test-span ?
test-optimization-playwright-latest-oldest-playwright-atr ?
test-optimization-playwright-latest-oldest-playwright-efd ?
test-optimization-playwright-latest-oldest-playwright-impacted-tests ?
test-optimization-playwright-latest-oldest-playwright-reporting ?
test-optimization-playwright-latest-oldest-playwright-test-management ?
test-optimization-playwright-oldest-latest-playwright-active-test-span ?
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 ?
test-optimization-playwright-oldest-oldest-playwright-atr ?
test-optimization-playwright-oldest-oldest-playwright-efd ?
test-optimization-playwright-oldest-oldest-playwright-final-status ?
test-optimization-playwright-oldest-oldest-playwright-impacted-tests ?
test-optimization-playwright-oldest-oldest-playwright-reporting ?
test-optimization-playwright-oldest-oldest-playwright-test-management ?
test-optimization-selenium-latest ?
test-optimization-selenium-oldest ?
test-optimization-testopt-active ?
test-optimization-testopt-latest ?
test-optimization-testopt-maintenance ?
test-optimization-testopt-oldest ?
test-optimization-vitest-latest ?
test-optimization-vitest-oldest ?

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

// Default on; users opt out by setting to false.
function isCrossInvocationTracingEnabled () {
return !isFalse(getEnvironmentVariable('DD_DURABLE_CROSS_INVOCATION_TRACING_ENABLED'))
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.

Please use !this._tracerConfig.DD_DURABLE_CROSS_INVOCATION_TRACING_ENABLED. The config should be available in the plugin, see comment below

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js Outdated
Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js Outdated
const datadogOnlyPropagatorCache = new WeakMap()

function getDatadogOnlyPropagator (tracer) {
const config = tracer?._tracer?._config ?? tracer?._config
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 the tracer ever not be defined? Similar with the properties that are accessed from it here.

I believe we also only need one of the two

} else {
// Test environments pass a tracer mock without `_config`. Fall back to
// its own `inject` so unit tests can assert on the shape they control.
tracer.inject?.(span, 'http_headers', headers)
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.

Please adjust the tracer mock instead of writing source code in a particular way for making the test pass

tracer.inject?.(span, 'http_headers', headers)
}
} catch (e) {
log.debug('Failed to inject trace context', e)
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.

Should we guard against something here? I am unsure if this could ever somehow fail

function parseCheckpointPayload (op) {
try {
const raw = op?.Payload ?? op?.StepDetails?.Result
if (!raw || typeof raw !== 'string') return null
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.

Nit: we normally return undefined instead of null. I believe we could change these everywhere?

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/trace-checkpoint.js Outdated
const wrappedHandler = ctx.arguments[5]
void wrappedHandler({}, { checkpoint: { checkpoint: async () => {} } })
executionContext.terminationManager.terminate({ reason: 'A_REASON_THE_SDK_HAS_NOT_TAUGHT_US_ABOUT' })
await new Promise(resolve => setImmediate(resolve))
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.

Suggestion: We could use timers.promises.setImmediate() instead :)

Same in the other spots

Comment thread packages/datadog-plugin-aws-durable-execution-sdk-js/src/trace-checkpoint.js Outdated
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.

2 participants