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.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).Related
- Go Integration Guide - Setup, manual spans, data capture and the REST client
- Go SDK API Reference - Instrumentation options and data capture
- Capturing Evaluations & Guardrails - Log evaluations and implement guardrails