Skip to main content

Overview

This example proves the local observability mechanisms that are useful when a structured-output call has to be debugged in production. It runs one deterministic invalid-then-corrected response through the real StructuredOutput pipeline and records the same execution through four surfaces:
  • wiretap(): receives every runtime event in process
  • onEvent(): receives a specific event class
  • EventLog::enable() plus EventLog::root(): writes structured JSONL logs
  • RuntimeEventBridge: projects runtime events into telemetry observations
The example uses a local recording inference driver and a local telemetry exporter, so it does not require provider credentials or a Langfuse/Logfire account.

Example