Skip to content
Commit Detail

Commit dc25e37

Author
Dan Lapid <dan.lapid@gmail.com> 2026-04-19 22:41:43 +0000
Parents
f7bb1c1
Tree
1cf4d09
Expose Tracing on ctx.tracing and 'cloudflare:workers' import

Adds `ctx.tracing` (gated on the `workerdExperimental` compat flag
in `getTracing`, which returns `undefined` outside the flag) and a
`tracing` named export on `cloudflare:workers` that re-exports the
`cloudflare-internal:tracing` module.

The BUILD.bazel change folds `tracing.{h,c++}` into the
`api:srcs` / `:hdrs` filegroups and drops the standalone
`wd_cc_library(name = "tracing-module")` target. This is the
idiomatic workaround for the api<->io circular dep documented in
`src/workerd/io/BUILD.bazel`: `global-scope.c++` now needs the
full `Tracing` definition to implement `getTracing`, and
`global-scope.c++` lives inside `//src/workerd/io` via that
filegroup, so a standalone tracing-module library that (transitively)
depends on `//src/workerd/io` would cycle.

Files changed