File
Blob: src/cloudflare/internal/test/tracing/tracing-hierarchy-test.wd-test
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | # Validates that enterSpan-produced user spans have the correct parent/child |
| 4 | # relationships in the streaming-tail event stream. Covers nested enterSpan (sync/async), |
| 5 | # fetch-inside-enterSpan, and sibling enterSpans. |
| 6 | |
| 7 | const unitTests :Workerd.Config = ( |
| 8 | services = [ |
| 9 | ( name = "tracing-hierarchy-test", |
| 10 | worker = ( |
| 11 | modules = [ |
| 12 | (name = "worker", esModule = embed "tracing-hierarchy-test.js"), |
| 13 | ], |
| 14 | compatibilityFlags = ["experimental", "nodejs_compat"], |
| 15 | streamingTails = ["tail"], |
| 16 | bindings = [ |
| 17 | ( |
| 18 | name = "fetchTarget", |
| 19 | service = "tracing-hierarchy-mock" |
| 20 | ), |
| 21 | ( |
| 22 | name = "tracingTest", |
| 23 | wrapped = ( |
| 24 | moduleName = "cloudflare-internal:test-tracing-wrapper" |
| 25 | ) |
| 26 | ) |
| 27 | ], |
| 28 | ) |
| 29 | ), |
| 30 | ( name = "tracing-hierarchy-mock", |
| 31 | worker = ( |
| 32 | compatibilityFlags = ["experimental", "nodejs_compat"], |
| 33 | modules = [ |
| 34 | (name = "worker", esModule = embed "tracing-hierarchy-mock.js"), |
| 35 | ], |
| 36 | ) |
| 37 | ), |
| 38 | ( name = "tail", worker = .tailWorker, ), |
| 39 | ] |
| 40 | ); |
| 41 | |
| 42 | const tailWorker :Workerd.Worker = ( |
| 43 | modules = [ |
| 44 | (name = "worker", esModule = embed "tracing-hierarchy-instrumentation-test.js"), |
| 45 | (name = "instrumentation-test-helper", esModule = embed "../instrumentation-test-helper.js") |
| 46 | ], |
| 47 | compatibilityFlags = ["experimental", "nodejs_compat"], |
| 48 | ); |