Skip to main content

Overview

This example uses InferenceRuntime directly and shows the Logfire connection inline. It is useful when you want visibility into the raw LLM call path without the additional StructuredOutput layer. Key concepts:
  • explicit LogfireConfig / LogfireExporter setup
  • InferenceRuntime: direct Polyglot runtime for inference calls
  • PolyglotTelemetryProjector: maps inference lifecycle events
  • HttpClientTelemetryProjector: captures transport spans
  • Telemetry::flush(): pushes the final batch to Logfire

Example