Is your feature request related to a problem?
The user builds their AI features with Firebase Genkit, calling models through Vertex AI. There is currently no way to get Genkit traces and generations into PostHog AI observability: none of the @posthog/ai integrations (OpenAI, Anthropic, Gemini, LangChain, OpenAI Agents, Vercel AI SDK) cover Genkit, so apps built on it have no instrumentation path.
Describe the solution you'd like
First-class Genkit support in AI observability, so that flows, model calls, and tool calls made through Genkit (including via Vertex AI) show up as traces and generations.
The most natural implementation path looks like extending the existing OpenTelemetry integration. Genkit instruments itself with OpenTelemetry out of the box, and @posthog/ai already ships a PostHogSpanProcessor / PostHogTraceExporter that converts AI spans into AI observability events. However, that processor only recognizes spans whose name or attribute keys start with gen_ai., llm., ai., or traceloop. (see isAISpan in packages/ai/src/otel/spans.ts), while Genkit uses its own genkit: attribute namespace (genkit:type, genkit:input, genkit:output, etc.). Teaching the span processor to understand Genkit's span conventions, or shipping a small dedicated Genkit telemetry plugin, would close the gap.
Describe alternatives you've considered
- Calling Vertex AI directly through the
@google/genai SDK with PostHog's Gemini integration works today, but that means giving up the Genkit framework layer (flows, prompts, tool orchestration).
- Wiring Genkit's OpenTelemetry output to the existing PostHog OTel exporter does not work as-is, because Genkit spans don't match the recognized AI span prefixes.
Additional context
Debug info
Is your feature request related to a problem?
The user builds their AI features with Firebase Genkit, calling models through Vertex AI. There is currently no way to get Genkit traces and generations into PostHog AI observability: none of the
@posthog/aiintegrations (OpenAI, Anthropic, Gemini, LangChain, OpenAI Agents, Vercel AI SDK) cover Genkit, so apps built on it have no instrumentation path.Describe the solution you'd like
First-class Genkit support in AI observability, so that flows, model calls, and tool calls made through Genkit (including via Vertex AI) show up as traces and generations.
The most natural implementation path looks like extending the existing OpenTelemetry integration. Genkit instruments itself with OpenTelemetry out of the box, and
@posthog/aialready ships aPostHogSpanProcessor/PostHogTraceExporterthat converts AI spans into AI observability events. However, that processor only recognizes spans whose name or attribute keys start withgen_ai.,llm.,ai., ortraceloop.(seeisAISpaninpackages/ai/src/otel/spans.ts), while Genkit uses its owngenkit:attribute namespace (genkit:type,genkit:input,genkit:output, etc.). Teaching the span processor to understand Genkit's span conventions, or shipping a small dedicated Genkit telemetry plugin, would close the gap.Describe alternatives you've considered
@google/genaiSDK with PostHog's Gemini integration works today, but that means giving up the Genkit framework layer (flows, prompts, tool orchestration).Additional context
genkit:attribute namespace): https://github.com/firebase/genkit/blob/main/js/core/src/tracing/instrumentation.tsDebug info
docker compose, version/commit: [please provide]Sunsetting Kubernetes support), version/commit: [please provide]