opentelemetry-api
OpenTelemetry Python API
Decision gist · record as of 2026-08-14
Yes, if you are instrumenting a library or building observability into a Python application. The API is stable for traces and metrics, has low install friction, and is actively maintained. Install it alongside an SDK (opentelemetry-sdk) or exporter to actually collect and export telemetry; the API alone provides no-op behavior. No security vulnerabilities reported.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- The API alone provides no-op implementations; a working SDK (e.g., opentelemetry-sdk) is needed to actually export telemetry data.
- Low friction install with a single lightweight runtime dependency (typing-extensions).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for both proprietary and open-source projects.
last release 2026-07-16 (29 days) · last repo commit 2026-08-13 · 2,587 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 463,796,331 downloads/mo, #86 on PyPI
Alternatives
Verify before relying
pip install opentelemetry-api
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("operation") as span:
span.set_attribute("key", "value")- Whether the package is suitable for production use without an SDK implementation (no-op behavior may not meet observability goals).
- Performance overhead of instrumentation calls when using no-op implementations.
What it is and what it does
OpenTelemetry API is the standardized interface layer for instrumenting Python applications with observability signals—traces, metrics, and logs. It defines abstract classes and no-op implementations that follow the OpenTelemetry specification, allowing libraries and frameworks to emit telemetry data without depending on a concrete SDK. Application developers then choose which SDK or exporter to install to actually collect and send that data to observability backends.
The package is designed for library authors who want to instrument their code portably, and for application developers building observability into their systems. It has minimal dependencies (only typing-extensions) and is actively maintained by the OpenTelemetry project. Traces and metrics signals are stable; the logs signal is still in development and may include breaking changes.
Use it for
- Instrument a library with tracing calls that will work regardless of which SDK the consuming application installs.
- Set up manual span creation and attribute annotation in a Python service before choosing an exporter backend.
- Emit custom metrics from application code using a standardized API that integrates with observability platforms.
- Build a framework that needs to support multiple observability backends without coupling to a specific implementation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are instrumenting a library or building observability into a Python application.
The API is stable for traces and metrics, has low install friction, and is actively maintained. Install it alongside an SDK (opentelemetry-sdk) or exporter to actually collect and export telemetry; the API alone provides no-op behavior. No security vulnerabilities reported.
Install
opentelemetry-api on PyPI
Before you install
Low friction install with a single lightweight runtime dependency (typing-extensions). Active maintenance with a release 29 days ago and 2587 GitHub stars. Supports Python 3.10 through 3.14.
Requires Python 3.10 or later. The API alone provides no-op implementations; a working SDK (e.g., opentelemetry-sdk) is needed to actually export telemetry data.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for both proprietary and open-source projects.
Quickstart
pip install opentelemetry-api
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("operation") as span:
span.set_attribute("key", "value")
Verify before relying
- Whether the package is suitable for production use without an SDK implementation (no-op behavior may not meet observability goals).
- Performance overhead of instrumentation calls when using no-op implementations.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 463,796,331 / month, #86 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: OpenTelemetryIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed |
Evidence: opentelemetry_api-1.44.0-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 specification”
- opentelemetry-apiProvides the abstract API and interfaces for OpenTelemetry…
- opentelemetry-semantic-conventionsProvides generated Python code for OpenTelemetry semantic…
- openinference-semantic-conventionsDefines semantic conventions and standardized attributes for tracing…
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.
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.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
See also opentelemetry-distro · opentelemetry-test-utils · opentelemetry-propagator-b3 · opentelemetry-instrumentation-openai-agents-v2 · opentelemetry-instrumentation-logging · coralogix-opentelemetry · uptrace · opentelemetry-instrumentation-exceptions