Registry /
observability / opentelemetry-instrumentation-pinecone
Install & Compatibility
Where this runs
tested against v0.60.0 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.512s · 40.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.6s · import 0.464s · 41MB
39MB installed
● package 39MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PineconeInstrumentor
✓ from opentelemetry.instrumentation.pinecone import PineconeInstrumentor
This quickstart demonstrates how to set up basic OpenTelemetry console tracing and instrument the Pinecone client. Ensure you have the `pinecone` library (v2+) and OpenTelemetry SDK installed. Set `PINECONE_API_KEY` and `PINECONE_ENVIRONMENT` environment variables for a runnable example.
import os
from opentelemetry import trace
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
from opentelemetry.instrumentation.pinecone import PineconeInstrumentor
import pinecone
# 1. Setup OpenTelemetry Tracer Provider (for console output)
resource = Resource.create({"service.name": "my-pinecone-app"})
provider = TracerProvider(resource=resource)
span_processor = SimpleSpanProcessor(ConsoleSpanExporter())
provider.add_span_processor(span_processor)
trace.set_tracer_provider(provider)
# 2. Instrument Pinecone client calls
PineconeInstrumentor().instrument()
# 3. Use Pinecone as usual
api_key = os.environ.get("PINECONE_API_KEY", "YOUR_API_KEY")
environment = os.environ.get("PINECONE_ENVIRONMENT", "YOUR_ENVIRONMENT")
if api_key == "YOUR_API_KEY" or environment == "YOUR_ENVIRONMENT":
print("Please set PINECONE_API_KEY and PINECONE_ENVIRONMENT environment variables.")
print("Skipping Pinecone client interaction due to missing credentials.")
elif not pinecone.list_indexes: # Check if the package is the new pinecone library
print("It appears you are using the old `pinecone-client` library. This instrumentation requires `pinecone` (v2+).")
print("Skipping Pinecone client interaction.")
else:
try:
pinecone.init(api_key=api_key, environment=environment)
# This operation will be traced
indexes = pinecone.list_indexes()
print(f"Pinecone Indexes: {indexes}")
print("Check your console for OpenTelemetry traces!")
except Exception as e:
print(f"Error interacting with Pinecone: {e}")
print("Ensure your Pinecone API Key and Environment are correct and that you are using `pinecone` v2+.")
opentelemetry-instrument --version
Upgrade
Version history
0.62.3latest on PyPI · released Aug 10, 2026
Audit
Dependencies
pineconerequiredThe instrumentation targets the `pinecone` client library. It must be installed separately for the instrumentation to function.
opentelemetry-sdkrequiredRequired for configuring tracing providers and exporters to process and send telemetry data.
opentelemetry-apirequiredCore OpenTelemetry API, usually pulled in by the SDK.