Skip to main content

respan-instrumentation-google-genai

Respan instrumentation plugin for the official Google Gen AI SDK.

The package patches google.genai.models.Models and AsyncModels generation methods and emits canonical Respan chat spans through the active OTEL pipeline. It captures sync calls, async calls, streaming calls, prompt and completion content, token usage, tool definitions, and model function calls.

Installation

pip install respan-ai respan-instrumentation-google-genai google-genai

Usage

from google import genai
from respan import Respan
from respan_instrumentation_google_genai import GoogleGenAIInstrumentor

respan = Respan(instrumentations=[GoogleGenAIInstrumentor()])
client = genai.Client()

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Say hello in three languages.",
)
print(response.text)
respan.flush()

Metadata

Release files for respan-instrumentation-google-genai 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for respan-instrumentation-google-genai 0.1.1
File Size Uploaded
respan_instrumentation_google_genai-0.1.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for respan-instrumentation-google-genai 0.1.1
File Interpreter ABI Platform
respan_instrumentation_google_genai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / respan_instrumentation_google_genai-0.1.1.tar.gz

Download URL respan_instrumentation_google_genai-0.1.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ede725c23fa83389839bdc9e207909bd4e6c87bbd1eca52bf791566071872a6d
BLAKE2b-256 checksum
How to use checksums
976aa17a0ef66715137c155655720eece19522698ab098892c8fb4107a106adc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / respan_instrumentation_google_genai-0.1.1-py3-none-any.whl

Download URL respan_instrumentation_google_genai-0.1.1-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f4f2a1883d28b3434680f6c4676fe7c9a46b022fbb41b929587dec157d679b3
BLAKE2b-256 checksum
How to use checksums
708aa917d02a9bd3c70a2de5bba58c7ce708a316c7ba55f66da9e23d0d436388
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page