Open-source, OpenTelemetry-native observability platform that brings logs, metrics, traces, alerts and dashboards into one self-hostable tool.
open-telemetry/opentelemetry-python
Python API and SDK for OpenTelemetry, the vendor-neutral framework for collecting traces, metrics and logs from applications.
- Stars
- 2,702
- Forks
- 1,059
- Open issues
- 428
- Last commit
- 9 hours ago
What is it?
OpenTelemetry Python is the Python implementation of the OpenTelemetry observability standard. It provides an API for instrumenting code with traces, metrics and logs, and an SDK that serves as the reference implementation of that API, handling sampling, processing and export of the telemetry data.
The project is split into packages. Libraries that emit telemetry depend only on opentelemetry-api, leaving the choice of SDK to the application. Exporter and propagator packages live in the same repository, and the API and SDK are published to PyPI. Traces and metrics are marked stable, while logs are still in development.
The SDK is aimed at teams that want to send telemetry from Python services to any OpenTelemetry-compatible backend without tying their code to a single vendor. Instrumentation libraries for common frameworks are maintained separately in the opentelemetry-python-contrib repository.
Key features
- 01Provides a vendor-neutral API for traces, metrics and logs.
- 02Includes a reference SDK for processing and exporting telemetry data.
- 03Separates the API from the SDK so libraries can emit telemetry without choosing a backend.
- 04Ships exporter and propagator packages that install independently via pip.
- 05Supports current Python versions, with support dropped as Python versions reach end of life.
Use cases
- Instrumenting a Python web service to trace requests across distributed systems.
- Exporting application metrics to an OpenTelemetry-compatible monitoring backend.
- Building a Python library that emits telemetry while leaving the SDK choice to its users.
Quick start
- 1
Install the API package from PyPI
pip install opentelemetry-api - 2
Install the SDK package from PyPI
pip install opentelemetry-sdk
Things to know
- Logs signal is still in development and may have breaking changes.
In collections
Topics
FAQ
- What is opentelemetry-python?
- Python API and SDK for OpenTelemetry, the vendor-neutral framework for collecting traces, metrics and logs from applications. OpenTelemetry Python is the Python implementation of the OpenTelemetry observability standard. It provides an API for instrumenting code with traces, metrics and logs, and an SDK that serves as the reference implementation of that API, handling sampling, processing and export of the telemetry data.
- Is opentelemetry-python free to use? What license does it have?
- opentelemetry-python is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is opentelemetry-python still maintained?
- Actively maintained. The last commit to opentelemetry-python was on Nov 6, 2026.
- What can I use opentelemetry-python for?
- Instrumenting a Python web service to trace requests across distributed systems. Exporting application metrics to an OpenTelemetry-compatible monitoring backend. Building a Python library that emits telemetry while leaving the SDK choice to its users.
- How do I install opentelemetry-python?
- Install the API package from PyPI: pip install opentelemetry-api Install the SDK package from PyPI: pip install opentelemetry-sdk
- Where can I get opentelemetry-python?
- The source code and installation instructions are on GitHub: https://github.com/open-telemetry/opentelemetry-python
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An APM system for monitoring, tracing and diagnosing distributed and cloud-native microservice architectures.
Self-hostable observability platform for logs, metrics, traces, RUM and LLM monitoring, built in Rust and positioned as an alternative to Datadog and Splunk.
The Go implementation of OpenTelemetry, providing APIs and SDKs to instrument Go applications for traces, metrics and logs.
Open source APM that collects OpenTelemetry traces, metrics, and logs into one UI, backed by ClickHouse storage.
A vendor-agnostic service that receives, processes and exports traces, metrics and logs to multiple observability backends.