Repository navigation
test(integration): add timeout golden coverage - #842
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85fdb2ee23
ℹ️ 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".
zarirhamza
approved these changes
Sep 28, 2026
3 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
In today's dd-trace-js, there's a feature for aws lambda called 'timeout spans'.
We are adding tests cases here in datadog-lambda-js to make sure the feature is not broken during migration.
What does this PR do?
Adds pre-migration timeout golden coverage to the local RIE integration suite:
manual-timeout: explicit tracer initialization followed by manualdatadog(handler)wrapping.cjs-timeout: the same handler through theDD_LAMBDA_HANDLERredirect.timeout.unfinishedchild span open beyond the real five-second RIE deadline.RIE_HTTP_TRANSPORT=containerfor local environments whose published host ports are unreachable.No production library changes. The test-only Lambda runtime images are now pinned to multi-architecture digests; three existing expectations are refreshed for the reviewed Node 22/24 runtime update.
Motivation
Freeze the existing timeout contract before moving Lambda instrumentation into dd-trace. Checking all trace payloads prevents a matching span from hiding a duplicate invocation span in another trace.
Testing Guidelines
Validation on the merged pre-migration baseline
291fd14e(datadog-lambda-js12.143.0):container-cjsandmanual-throw-errorsnapshots passed unchanged on Node 22.node --test integration_tests_local/check-timeout-logs.test.js: 9 passed.Additional Notes
The log differences are
dd_traceversion taglinks: []fieldsNo checker assertions or normalization rules were loosened; timeout return-value goldens are unchanged.
CI then exposed floating-runtime drift: local cached images were from August 28 while clean CI runners pulled newer Node 22/24 images. Reproduced both differences with CI's exact images and reviewed their runtime source. The proactive-init snapshots now retain the new structured
runtime_worker_pool_initializingDEBUG record; the Node 24 thrown-error response now retains itsrequestIdfield with existing value normalization. No runtime log filtering or behavior assertions were weakened. The existing thrown-error log golden and all timeout goldens are unchanged by this follow-up. Test image digests are pinned inlambda_node_image_tag()so local and CI runs cannot silently diverge again.The earlier
cf751a76capture used dd-trace 5.105.0 on all runtimes and was no longer the correct baseline after merging main. The README records current provenance and verification.Local validation used
RIE_HTTP_TRANSPORT=containerto bypass broken Colima host-port forwarding. Native amd64 and real AWS timeout validation were not run locally. These are emulator goldens, not proof of deployed Lambda termination or layer packaging. CI run 36170985446 passed all ten native runtime/architecture jobs on85fdb2ee: Node 18/20/22/24/26 on amd64 and arm64, including the no-snapshot-writes guard. Unrelated migration-planning edits remain outside this PR.Types of Changes
Check all that apply