Local observability and metrics
Tracing
Section titled “Tracing”Genkit Dart uses a pluggable instrumentation system that is decoupled from OpenTelemetry. By default Genkit is not instrumented.
In the dev environment, a built-in provider is auto-injected when a telemetry
server is available, so the Developer UI works out of the box. It posts spans
directly to the Genkit telemetry server over HTTP (no OTel dependency) and
forwards package:logging records correlated with the active span.
To view traces locally:
- Start the Genkit Developer UI:
genkit start -- dart run- Run your flow or action.
- Open the Developer UI (typically at
http://localhost:4000) to view traces and metrics.
To send spans to your own platform, implement Instrumentation and stack one or
more providers before creating your Genkit instance:
import 'package:genkit/telemetry.dart';
void main() { configureInstrumentation(myInstrumentation()); // ... create Genkit and define your flows.}You do not have to write one for OpenTelemetry. The genkit_otel package ships
a provider that follows the OTel GenAI semantic conventions; see
OpenTelemetry GenAI semantic conventions.
Metrics
Section titled “Metrics”Genkit Dart core records no metrics of its own. Metrics come from the
instrumentation provider you configure: genkit_otel emits the two OpenTelemetry
GenAI client metrics, token usage and operation duration. The Developer UI does
not display metrics either way; they leave the process through your exporter.
See OpenTelemetry GenAI semantic conventions.
Production observability
Section titled “Production observability”There is no Genkit Monitoring plugin for Dart. For production observability,
use genkit_otel to export traces and metrics to any OTLP-compatible backend;
see
OpenTelemetry GenAI semantic conventions.