Observability & debugging
Observability is built in — and the single-choke-point architecture makes it cheap. Every operation funnels through one place, so tracing and introspection come almost for free.
Correlation ids & structured traces
Section titled “Correlation ids & structured traces”Every op carries a correlationId. In dev mode, BridgeKit emits a structured trace event for
each op in one shared format to the JS console and to the native log (logcat on
Android, os_log on iOS, both under the BridgeKit tag):
op · contract · member · scope · duration · code · origin-side · epochBecause the JS and native traces share a format and a correlation id, you can follow a single call across the boundary end to end.
dump()
Section titled “dump()”Available on every side — JS, Android, and iOS. It prints a live snapshot of everything the runtime is holding:
- bindings per scope,
- park-buffer contents,
- open streams (and their buffer fill),
- state mirror values,
- the current epoch,
- readiness,
- the cumulative counters:
calls,errors,firesDropped,openStreams,streamDrops.
// JSBridgeKit.dump();// KotlinBridgeKit.default.dump()// SwiftBridgeKitRuntime.default.dump()Errors always state why
Section titled “Errors always state why”Every error envelope embeds readiness and provision context, so a failure reads as a diagnosis rather than a riddle:
TIMEOUT: dispatcher connected, contract 'connect.host' not provided in scope feature(Connect)Fire-and-forget is not invisible
Section titled “Fire-and-forget is not invisible”Fire-and-forget failures (no provider, no method) are counted and surfaced in dump().
A dropped fire in production is a number you can see, not a silent void.
The live debug screen
Section titled “The live debug screen”The harness app ships a debug screen that renders dump() live, on Android and on iOS.
You watch bindings appear, streams fill, state mirrors update, and the epoch tick over on a
runtime reload, in real time — the same screen, the same snapshot, on both platforms.