Registry / observability / opentelemetry-instrumentation-mcp

opentelemetry-instrumentation-mcp

JSON →
library0.62.3pypypi✓ verified 23d ago

The `opentelemetry-instrumentation-mcp` package provides automatic OpenTelemetry instrumentation for a wide array of Large Language Models (LLMs), vector databases, and other AI frameworks. As part of the Traceloop `openllmetry` project, it acts as a meta-package, consolidating over 30 individual instrumentations for popular libraries like OpenAI, LangChain, Anthropic, and Pinecone into a single installation. It is currently at version 0.58.0 and follows a rapid release cadence with frequent updates.

pip install opentelemetry-instrumentation-mcp openllmetry-sdk
INSTALL
IMPORT
SIG · OPENTELEMETRY-INST
O
opentelemetry-instrumentation-mcp
observabilitypythonv0.62.3
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/2 runs
1/2 runs
py 3.11
1/2 runs
1/2 runs
py 3.12
1/2 runs
1/2 runs
py 3.13
1/2 runs
1/2 runs
py 3.9
1/2 runs
1/2 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

init
from openllmetry.sdk import init
The `opentelemetry-instrumentation-mcp` package is a meta-package that installs numerous individual AI/LLM instrumentations. The `init` function from `openllmetry.sdk` is used to enable all installed OpenLLMetry instrumentations.

This quickstart demonstrates how to initialize OpenLLMetry using `openllmetry.sdk.init()` after installing the `opentelemetry-instrumentation-mcp` meta-package. It then makes a sample call to OpenAI, which will be automatically traced. Ensure your `OPENAI_API_KEY` is set as an environment variable and an OpenTelemetry collector is configured (e.g., via `OTEL_EXPORTER_OTLP_ENDPOINT`).

import os from openllmetry.sdk import init from openai import OpenAI # Initialize OpenLLMetry to enable instrumentation init() # Ensure OPENAI_API_KEY is set in your environment openai_api_key = os.environ.get('OPENAI_API_KEY', '') if not openai_api_key: print("Warning: OPENAI_API_KEY not set. Skipping OpenAI call.") else: print("OpenAI API Key found. Making a sample call...") client = OpenAI(api_key=openai_api_key) try: completion = client.chat.completions.create( model="gpt-3.5-turbo", messages=[ {"role": "user", "content": "What is OpenTelemetry?"} ] ) print(f"OpenAI response: {completion.choices[0].message.content[:50]}...") print("Traces for this call should be visible in your configured OpenTelemetry collector.") except Exception as e: print(f"Error during OpenAI call: {e}")
Debug
Known issues
breakingFrequent updates to OpenTelemetry GenAI Semantic Conventions may lead to changes in span and attribute names. This is common in a rapidly evolving ecosystem.
fix
Regularly update `opentelemetry-instrumentation-mcp` and `openllmetry-sdk` to the latest versions. Adjust any downstream monitoring queries or dashboards to reflect new semantic convention attribute names as they evolve.
affects: All versions before 0.58.0 (e.g., v0.55.0, v0.58.0 specifically mention GenAI semconv updates). Users should refer to release notes for exact attribute changes.
gotchaThis package (`opentelemetry-instrumentation-mcp`) is a meta-package, meaning installing it brings in a large number of individual `opentelemetry-instrumentation-*` packages. This can lead to a large dependency tree and potential version conflicts with other libraries in your project.
fix
If you only need instrumentation for a specific LLM or AI framework (e.g., OpenAI), consider installing only `opentelemetry-instrumentation-openai` (and `openllmetry-sdk`) instead of the `mcp` meta-package to keep your dependency footprint smaller.
affects: All versions.
breakingInstrumentation for Pinecone switched from the deprecated `pinecone-client` to the `pinecone` package.
fix
Ensure your project uses the `pinecone` package (version >=3.0.0 typically) instead of `pinecone-client` if you intend for Pinecone calls to be instrumented. Update your `requirements.txt` accordingly.
affects: Prior to 0.53.0. Versions from 0.53.0 onwards use the new `pinecone` package.
Upgrade
Version history
0.62.3latest on PyPI · released Aug 10, 2026
Audit
Dependencies
openllmetry-sdkrequiredRequired to initialize and enable the instrumentations provided by this meta-package.
opentelemetry-apioptionalCore OpenTelemetry API, often a transitive dependency of openllmetry-sdk.
opentelemetry-sdkoptionalCore OpenTelemetry SDK, often a transitive dependency of openllmetry-sdk.
openaioptionalAn example of a library that this package instruments. Many other LLM/AI framework clients are implicitly instrumented upon installation.
Agent activity
40 hits · last 30 days
node
35
OpenAI (training)
1
Resources
opentelemetry-instrumentation-mcp — pip install opentelemetry-instrumentation-mcp · libregistry