Skip to main content
Firebase Genkit for Go is OpenTelemetry-native: it already emits its own gen_ai.* spans for flows, models and tools onto the global OpenTelemetry tracer provider. The LangWatch Genkit package does no body parsing; it registers a LangWatch span processor on the tracer provider Genkit’s spans flow through, so whatever Genkit records (model, token usage, prompt/completion and tool data) is exported to LangWatch.

Installation

Usage

Set the LANGWATCH_API_KEY environment variable before running.
Register LangWatch once, after genkit.Init:
RegisterLangWatch reads LANGWATCH_API_KEY (and LANGWATCH_ENDPOINT) from the environment by default. To forward exporter options (API key, endpoint, data capture, filters), pass WithExporterOptions:
LangWatch captures whatever gen_ai.* attributes Genkit records; there is no extra parsing in this package. If you build your own sdktrace.TracerProvider, use lwgenkit.SpanProcessor(opts...) to obtain the processor and register it yourself (Genkit reads the global tracer provider).
Last modified on September 8, 2026