$npx skillfedfor your agent

opentelemetry-instrumentation-google-genai

OpenTelemetry

With conditionsPyPI MonitoringReleased Jul 20261.7M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — opentelemetry_instrumentation_google_genai-1.0b1-py3-none-any.whl
v1.0b1 · released 2026-07-13 · Python >=3.10 · 5 runtime deps: opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, opentelemetry-util-genai, wrapt

Yes, with conditions. Install if you are already using OpenTelemetry in your application and need observability into Google GenAI SDK calls. The low install friction and permissive license make it a straightforward addition. However, be aware it is experimental with known blockers to stability—review TODOS.md before production use and expect potential API or behavior changes in future releases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; assumes OpenTelemetry tracing, logging, and metrics are already configured in your application.
  • Low friction install with five runtime dependencies, all from the OpenTelemetry ecosystem.
  • Active maintenance as of 2026-08-14 with recent release history; however, marked experimental with known defects listed in TODOS.md that are blockers to stability.

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-07-13 (32 days) · last repo commit 2026-08-14 · 28 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,678,224 downloads/mo, #3,661 on PyPI

Verify before relying

pip install opentelemetry-instrumentation-google-genai

from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
from google.genai import Client

GoogleGenAiSdkInstrumentor().instrument()
client = Client()
response = client.models.generate_content(
    model="gemini-1.5-flash-002",
    contents="Write a short poem on OpenTelemetry."
)
  • Completeness of instrumentation coverage for all Google GenAI SDK operations beyond generate_content, embed_content, and interactions.create.
  • Behavior and correctness of automatic function calling span nesting under generate_content spans.
  • Performance impact of instrumentation on GenAI SDK operations at scale.
Same gist for agents: .md · .json

What it is and what it does

This package wraps the Google GenAI SDK with OpenTelemetry instrumentation to automatically capture observability data from GenAI operations. It emits trace spans for calls like generate_content and embed_content, records prompts and responses as events/logs, and aggregates metrics describing GenAI activity—all following OpenTelemetry's GenAI semantic conventions. The instrumentation works by patching the SDK's client methods, so once you call instrument() it traces all subsequent GenAI operations without requiring changes to your application code.

The package is still experimental and has known defects documented in TODOS.md that block full stability. It supports Python 3.10 through 3.14 and integrates with the standard OpenTelemetry ecosystem (opentelemetry-api, opentelemetry-instrumentation, and related packages). You can optionally capture message content and GenerateContentConfig parameters via environment variables, and uninstrument clients when needed.

Use it for

  • Monitor GenAI API calls in production by emitting traces to your OpenTelemetry backend (e.g., Jaeger, Datadog, New Relic).
  • Debug GenAI application behavior by capturing prompts, responses, and tool calls as span events and logs.
  • Aggregate metrics on GenAI usage (request counts, latencies, token consumption) for cost and performance analysis.
  • Correlate GenAI operations with other application traces to understand end-to-end request flow.
  • Audit GenAI interactions by recording message content and configuration parameters when enabled.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, with conditions.

Install if you are already using OpenTelemetry in your application and need observability into Google GenAI SDK calls. The low install friction and permissive license make it a straightforward addition. However, be aware it is experimental with known blockers to stability—review TODOS.md before production use and expect potential API or behavior changes in future releases.

Install

opentelemetry-instrumentation-google-genai on PyPI

Before you install

Low friction install with five runtime dependencies, all from the OpenTelemetry ecosystem. Active maintenance as of 2026-08-14 with recent release history; however, marked experimental with known defects listed in TODOS.md that are blockers to stability.

Requires Python 3.10 or later; assumes OpenTelemetry tracing, logging, and metrics are already configured in your application.

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-genai

from opentelemetry.instrumentation.google_genai import GoogleGenAiSdkInstrumentor
from google.genai import Client

GoogleGenAiSdkInstrumentor().instrument()
client = Client()
response = client.models.generate_content(
    model="gemini-1.5-flash-002",
    contents="Write a short poem on OpenTelemetry."
)

Verify before relying

  • Completeness of instrumentation coverage for all Google GenAI SDK operations beyond generate_content, embed_content, and interactions.create.
  • Behavior and correctness of automatic function calling span nesting under generate_content spans.
  • Performance impact of instrumentation on GenAI SDK operations at scale.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
opentelemetry-apiopentelemetry-instrumentationopentelemetry-semantic-conventionsopentelemetry-util-genaiwrapt
MaintenanceActively maintained 32 days since the last release
Last repo commit
First released
Downloads1,678,224 / month, #3,661 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: opentelemetry_instrumentation_google_genai-1.0b1-py3-none-any.whl

Tags

Capabilities
opentelemetry google genai instrumentationtrace genai sdk operationsgoogle gemini telemetryllm observability instrumentationgenai span metrics eventsgoogle genai monitoringsemantic conventions genai
Topics
observabilitygenaiinstrumentation

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 genai instrumentation”

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

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.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

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.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also opentelemetry-instrumentation-openai-v2 · opentelemetry-util-genai · opentelemetry-semantic-conventions-ai · loongsuite-util-genai · openinference-instrumentation-google-genai · opentelemetry-instrumentation-voyageai · opentelemetry-instrumentation-groq · google-genai · opentelemetry-instrumentation-aiokafka · newrelic-telemetry-sdk