opentelemetry-instrumentation-google-generativeai
OpenTelemetry Google Generative AI instrumentation
Decision gist · record as of 2026-08-14
Yes, if you are using the Google Generative AI library and need observability into LLM calls. The package is actively maintained, has no security vulnerabilities, and integrates cleanly with the OpenTelemetry ecosystem. Install it if you already have an OpenTelemetry collector or exporter configured; otherwise, set up observability infrastructure first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; OpenTelemetry collector or exporter must be configured separately to receive traces.
- Low friction install with four runtime dependencies on the OpenTelemetry ecosystem.
- Package is actively maintained with recent releases and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production environments.
last release 2026-08-10 (4 days) · last repo commit 2026-08-10 · 7,377 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,093,808 downloads/mo, #2,758 on PyPI
Alternatives
Verify before relying
pip install opentelemetry-instrumentation-google-generativeai
from opentelemetry.instrumentation.google_generativeai import GoogleGenerativeAiInstrumentor
GoogleGenerativeAiInstrumentor().instrument()- Whether the package works with all versions of the Google Generative AI library or has specific version constraints
- Performance overhead of instrumentation on high-volume LLM applications
- Compatibility with non-Google OpenTelemetry exporters and backends
What it is and what it does
This package is an OpenTelemetry instrumentation layer that automatically captures telemetry from calls to the Google Generative AI library. When installed and initialized, it intercepts prompts, completions, and embeddings and exports them as OpenTelemetry spans, allowing you to observe and debug LLM application behavior through standard observability tools.
By default, it logs the full content of prompts and completions to span attributes for visibility into model inputs and outputs. This can be disabled via the TRACELOOP_TRACE_CONTENT environment variable if you need to protect sensitive user data or reduce trace size. The package depends on the core OpenTelemetry API and instrumentation framework, plus semantic convention libraries for AI workloads.
Use it for
- Debug Gemini API calls by inspecting prompts and completions in your observability backend
- Monitor token usage and latency of generative AI requests in production applications
- Correlate LLM traces with other application spans for end-to-end request tracing
- Audit what data is being sent to and received from the Generative AI API
- Evaluate model output quality by analyzing completions stored in trace attributes
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using the Google Generative AI library and need observability into LLM calls.
The package is actively maintained, has no security vulnerabilities, and integrates cleanly with the OpenTelemetry ecosystem. Install it if you already have an OpenTelemetry collector or exporter configured; otherwise, set up observability infrastructure first.
Install
opentelemetry-instrumentation-google-generativeai on PyPI
Before you install
Low friction install with four runtime dependencies on the OpenTelemetry ecosystem. Package is actively maintained with recent releases and no known vulnerabilities.
Requires Python 3.10 or later; OpenTelemetry collector or exporter must be configured separately to receive traces.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production environments.
Quickstart
pip install opentelemetry-instrumentation-google-generativeai
from opentelemetry.instrumentation.google_generativeai import GoogleGenerativeAiInstrumentor
GoogleGenerativeAiInstrumentor().instrument()
Verify before relying
- Whether the package works with all versions of the Google Generative AI library or has specific version constraints
- Performance overhead of instrumentation on high-volume LLM applications
- Compatibility with non-Google OpenTelemetry exporters and backends
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesopentelemetry-apiopentelemetry-instrumentationopentelemetry-semantic-conventions-aiopentelemetry-semantic-conventions |
| Maintenance | Actively maintained 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,093,808 / month, #2,758 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: opentelemetry_instrumentation_google_generativeai-0.62.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “opentelemetry google gemini tracing”
- opentelemetry-instrumentation-google-generativeaiAutomatically traces prompts, completions, and embeddings sent…
- openinference-instrumentation-google-adkAuto-instruments Google ADK applications to emit…
- opentelemetry-instrumentation-openai-v2Automatically traces and logs OpenAI API calls (and compatible…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also opentelemetry-instrumentation-openai · opentelemetry-semantic-conventions-ai · opentelemetry-instrumentation-vertexai · opentelemetry-instrumentation-replicate · google-generativeai · opentelemetry-instrumentation-transformers · opentelemetry-instrumentation-watsonx · weave · opentelemetry-instrumentation-together · opentelemetry-util-genai