Skip to main content
Google Gemini

Installation

Install both the Netra SDK and Google Generative AI SDK:

Usage

Initialize the Netra SDK with Gemini instrumentation enabled. The SDK automatically traces all Gemini API calls once initialized.

Streaming Responses

The SDK automatically handles streaming responses and captures the complete output:

Chat Sessions

Chat operations are also automatically instrumented:

Selective Instrumentation

Control which integrations are enabled using the instruments or blockInstruments configuration:

Next Steps

Last modified on March 17, 2026