Repository navigation
Commit a96a6c6
committed
local integration tests: cover callback handlers, fetch, metrics-only, payload capture
Four usage modes customers run today had no end-to-end coverage on any
surface (L2 local RIE, or the old AWS suite); PR 2a reached parity with the
old suite, and these are the first items beyond it (analysis:
nodejs/pr2b-coverage-analysis.md, roadmap: PR 2b). All goldens are captured
from the current pre-migration implementation.
- manual-callback: callback-style (event, context, callback) handler under
manual datadog() wrap. The migration spike broke exactly this seam (the
tracePromise wrapper replaced promisifiedHandler's call site, so callback
handlers returned null to API Gateway); handler.spec.ts pins the units,
this case pins the path end to end through the RIE invoke.
- cjs-fetch-requests: global fetch variant of cjs-http-requests. On Node 18+
fetch is undici, instrumented by dd-trace's undici plugin — a different
injection path than the http plugin that patches axios. The golden pins
the injected x-datadog-* headers via the mock echo (18/18 requests carry
all four headers).
- manual-metrics-only: DD_TRACE_ENABLED=false — the metrics-only customer
configuration. The golden pins that enhanced + custom metrics still flush
while no aws.lambda span, no trace JSON, and no dd.trace_id log
correlation appear. Return-value goldens are byte-identical to
manual-send-metrics (verified), confirming the toggle changes only the
tracing surface.
- cjs-capture-payload: DD_CAPTURE_LAMBDA_PAYLOAD=true in redirect mode; the
golden pins function.request / function.response span tags with the
captured payloads.
Also:
- README: case table entries for the four cases, and a "deliberately not
covered locally" list in the emulation-gaps section (streaming /
time_to_first_byte, direct-API and KMS/Secrets metric paths, aws-sdk
client spans, durable execution) with each item's owning suite, so the
scoping discussion does not recur.
- migration_parity.md: point the callback and payload-capture rows at the
new goldens; add dd-core ownership rows for fetch/undici injection and
Lambda profiling (DD_PROFILING_ENABLED was a documented feature with no
ledger row — capability lives in dd-trace's profiler, covered by its own
suites plus the L3 Profiling row).
Verified: all four cases green in verify mode on node22, node18 and
(manual-callback) node26 legs against shared goldens — no per-runtime
overrides needed.1 parent 2eec92d commit a96a6c6
18 files changed
Lines changed: 3485 additions & 2 deletions
File tree
- integration_tests_local
- snapshots
- logs
- return_values
- integration_tests/container/cjs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
| 121 | + | |
116 | 122 | | |
117 | 123 | | |
| 124 | + | |
| 125 | + | |
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
| |||
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
187 | 226 | | |
188 | 227 | | |
189 | 228 | | |
| |||
219 | 258 | | |
220 | 259 | | |
221 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
222 | 273 | | |
223 | 274 | | |
224 | 275 | | |
| |||
0 commit comments