File
Blob: src/cloudflare/internal/test/tracing/tracing-log-attribution-test.wd-test
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | # Validates that non-span tail events (Log, Exception, DiagnosticChannelEvent) |
| 4 | # emitted to a streaming tail worker carry the spanContext of the currently- |
| 5 | # active user span (pushed via ctx.tracing.enterSpan / withSpan), rather than |
| 6 | # always pointing at the root invocation span. See EW-10672. |
| 7 | |
| 8 | const unitTests :Workerd.Config = ( |
| 9 | services = [ |
| 10 | ( name = "tracing-log-attribution-test", |
| 11 | worker = ( |
| 12 | modules = [ |
| 13 | (name = "worker", esModule = embed "tracing-log-attribution-test.js"), |
| 14 | ], |
| 15 | compatibilityFlags = ["experimental", "nodejs_compat"], |
| 16 | streamingTails = ["tail"], |
| 17 | bindings = [ |
| 18 | ( |
| 19 | name = "tracingTest", |
| 20 | wrapped = ( |
| 21 | moduleName = "cloudflare-internal:test-tracing-wrapper" |
| 22 | ) |
| 23 | ) |
| 24 | ], |
| 25 | ) |
| 26 | ), |
| 27 | ( name = "tail", worker = .tailWorker, ), |
| 28 | ] |
| 29 | ); |
| 30 | |
| 31 | const tailWorker :Workerd.Worker = ( |
| 32 | modules = [ |
| 33 | (name = "worker", esModule = embed "tracing-log-attribution-instrumentation-test.js"), |
| 34 | ], |
| 35 | compatibilityFlags = ["experimental", "nodejs_compat"], |
| 36 | ); |