Skip to content

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.

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 · epoch

Because the JS and native traces share a format and a correlation id, you can follow a single call across the boundary end to end.

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.
// JS
BridgeKit.dump();
// Kotlin
BridgeKit.default.dump()
// Swift
BridgeKitRuntime.default.dump()

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 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 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.