genkit.Generate, genkit.GenerateText, and genkit.GenerateStream.
This guide covers manual instrumentation. For quicker setup, use auto-instrumentation.
Setup
Install the Braintrust Genkit integration:Trace with Firebase Genkit
This example uses explicit middleware, not auto-instrumentation. Create the middleware once and pass it viaai.WithMiddleware(...) on each Genkit call you want to trace.
Streaming
Pass the same middleware togenkit.GenerateStream:
#skip-compile