Skip to content

[bot] Firebase Genkit (genkit) not instrumented — no tracing for generate, chat, embed, or flow execution in JavaScript #1934

@braintrust-bot

Description

@braintrust-bot

Summary

Firebase Genkit (genkit on npm, v1.33.0, published 5 days ago) is Google's open-source framework for building AI-powered applications in JavaScript, Go, and Python. It provides execution APIs for text generation, chat, embeddings, flows, and tool calling. This repository has zero Genkit instrumentation — no wrapper, no channels, no plugin, no auto-instrumentation config. Users who use Genkit in JavaScript get no Braintrust spans.

Braintrust documents a Genkit integration at https://www.braintrust.dev/docs/integrations/sdk-integrations/firebase-genkit, but it covers Go only. There is no JavaScript/TypeScript Genkit instrumentation.

What instrumentation is missing

The genkit npm package exposes these execution surfaces, none of which are instrumented:

SDK Method Description
ai.generate() Text and multimodal generation across all configured models
ai.generateStream() Streaming generation
ai.chat() Multi-turn chat sessions
ai.embed() Text embeddings
ai.defineFlow() / flow execution Type-safe flow pipelines with input/output schemas
ai.defineTool() / tool execution Tool calling during generation
Dotprompt templates Prompt management and execution

No coverage in any instrumentation layer:

  • No wrapper function (e.g. wrapGenkit())
  • No diagnostics channels for Genkit methods
  • No plugin handler in js/src/instrumentation/plugins/
  • No auto-instrumentation config in js/src/auto-instrumentations/configs/
  • No vendor SDK types in js/src/vendor-sdk-types/
  • No e2e test scenarios

A grep for genkit (case-insensitive) across js/src/ returns zero matches.

Indirect coverage is limited:

Users running Genkit with a provider plugin backed by an instrumented SDK (e.g. @genkit-ai/google-genai which uses @google/genai internally) might get low-level model call spans from the underlying provider wrapper. However, the Genkit-level orchestration (flow execution, tool calls, chat session management, prompt rendering) would be invisible.

Context

Genkit is built and used in production by Google. It has a plugin architecture supporting Gemini, OpenAI, Anthropic, Ollama, and other providers. The genkit npm package is at v1.33.0 with frequent releases (multiple times per month). The Go Genkit integration for Braintrust already exists, demonstrating that Braintrust considers Genkit a valuable framework to support.

This repo already instruments a comparable Google framework — Google ADK (@google/adk) — which demonstrates the pattern for instrumenting Google's AI frameworks.

Braintrust docs status

supported for Go — the Braintrust Genkit integration page at https://www.braintrust.dev/docs/integrations/sdk-integrations/firebase-genkit documents Go-only setup. JavaScript/TypeScript is not mentioned.

Upstream references

Local files inspected

  • js/src/wrappers/ — no Genkit wrapper
  • js/src/instrumentation/plugins/ — no Genkit channels or plugin
  • js/src/auto-instrumentations/configs/ — no Genkit config
  • js/src/auto-instrumentations/index.ts — Genkit not listed among exported configs
  • js/src/vendor-sdk-types/ — no Genkit types
  • e2e/scenarios/ — no Genkit test scenarios
  • integrations/ — no Genkit integration package
  • Full repo grep for "genkit" in .ts files — zero matches

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions