using Workerd = import "/workerd/workerd.capnp"; # Validates that non-span tail events (Log, Exception, DiagnosticChannelEvent) # emitted to a streaming tail worker carry the spanContext of the currently- # active user span (pushed via ctx.tracing.enterSpan / withSpan), rather than # always pointing at the root invocation span. See EW-10672. const unitTests :Workerd.Config = ( services = [ ( name = "tracing-log-attribution-test", worker = ( modules = [ (name = "worker", esModule = embed "tracing-log-attribution-test.js"), ], compatibilityFlags = ["experimental", "nodejs_compat"], streamingTails = ["tail"], bindings = [ ( name = "tracingTest", wrapped = ( moduleName = "cloudflare-internal:test-tracing-wrapper" ) ) ], ) ), ( name = "tail", worker = .tailWorker, ), ] ); const tailWorker :Workerd.Worker = ( modules = [ (name = "worker", esModule = embed "tracing-log-attribution-instrumentation-test.js"), ], compatibilityFlags = ["experimental", "nodejs_compat"], );