opentelemetry-python is a free, open source monitoring & observability project written in Python and released under Apache-2.0. It has 2,702 GitHub stars, 1,057 forks and 425 open issues, and was last pushed 29 hours ago. On this registry it ranks #144 of 270 tracked projects in Monitoring & Observability, with 5 head-to-head comparisons available. It gained 51 stars over the last 30 tracked days.

What is opentelemetry-python?

OpenTelemetry Python is the Python implementation of the OpenTelemetry API and SDK, giving Python developers vendor-neutral instrumentation for traces, metrics and logs across distributed systems.

What it is

OpenTelemetry Python is an Apache-2.0 licensed repository that ships multiple installable Python packages rather than a single monolith. The opentelemetry-api package provides abstract classes and no-op implementations that comprise the OpenTelemetry API, following the OpenTelemetry specification. The opentelemetry-sdk package is the reference implementation of that API. The repository also contains an exporter directory of OpenTelemetry exporter packages and a propagator directory of OpenTelemetry propagator packages. It lives in the Python ecosystem and is part of the wider OpenTelemetry project, with a community Slack channel at cncf/otel/python and a homepage at opentelemetry.io.

The concrete problem it solves is tight coupling between application code and a specific observability backend. Libraries that produce telemetry data depend only on opentelemetry-api, which defers the choice of the SDK to the application developer. That replaces vendor-specific instrumentation, where swapping a tracing or metrics provider means rewriting call sites throughout the codebase. Because the API layer is a no-op by default, a library can ship instrumentation without forcing a backend on anyone, and the application developer then installs opentelemetry-sdk or another package that implements the API. Context propagation between services is handled separately through the propagator packages, covering tracecontext and correlationcontext.

Key capabilities

  • opentelemetry-api supplies the abstract API surface and no-op implementations; opentelemetry-sdk supplies the reference implementation.
  • Signal status is split: traces and metrics are stable, while logs are in development with expected deprecations and breaking changes.
  • Exporter packages live under exporter/ and install individually with pip install opentelemetry-exporter-{exporter}.
  • Propagator packages live under propagator/ and install individually with pip install opentelemetry-propagator-{propagator}.
  • Covered signals and topics include distributed tracing, metrics, logging, tracecontext and correlationcontext.
  • Python version policy tracks supported releases: minimum Python 3.10, new versions supported within three months of going stable, old versions dropped six months after end of life.
  • Documentation publishes on Read the Docs, and the project holds an OpenSSF Best Practices badge.

Who uses it and how

  • Library maintainers depend only on opentelemetry-api so their users choose the SDK, avoiding a forced backend dependency.
  • Application developers install opentelemetry-sdk, or an alternative API implementation, and wire an exporter package to send telemetry to their chosen backend.
  • Instrumentation authors and SDK developers absorb the log-signal deprecations and breaking changes as that signal stabilises.
  • Services spanning multiple processes use the propagator packages to carry tracecontext and correlationcontext across call boundaries.

Getting started

Install the API and reference SDK from PyPI with pip install opentelemetry-api and pip install opentelemetry-sdk; exporters and propagators install separately per package. The getting-started guide lives at opentelemetry.io/docs/languages/python/getting-started/, with reference documentation on Read the Docs.

How it compares

The facts provided name no comparable or paid alternative products, so no contrast with commercial offerings is offered here on licence, hosting or cost grounds. Within this registry it stands alone as the Python implementation of the OpenTelemetry API and SDK, and no similar tool is named alongside it.

When to use it — and when not to

Pick it when Python services need vendor-neutral traces and metrics and the team is willing to own exporter configuration and the backend that receives the data, since this repository ships the API, SDK, exporters and propagators but not a storage or query layer. Avoid it for production log pipelines today: logs are still in development, deprecations and breaking changes are expected, and instrumentation and SDK code may need updates. The project also carries 425 open issues, and the README defers setup detail to external documentation rather than covering it inline.

project readme (upstream, from github) — read inline

OpenTelemetry Python

Slack Build Status Minimum Python Version Release Read the Docs OpenSSF Best Practices

Project Status

See the OpenTelemetry Instrumentation for Python.

Signal Status Project
Traces Stable N/A
Metrics Stable N/A
Logs Development* N/A

Project versioning information and stability guarantees can be found here.

*Breaking Changes

[!IMPORTANT] We are working on stabilizing the Log signal which would require making deprecations and breaking changes. We will try to reduce the releases that may require an update to your code, especially for instrumentations or for SDK developers.

Getting started

You can find the getting started guide for OpenTelemetry Python here.

If you are looking for examples on how to use the OpenTelemetry API to instrument your code manually, or how to set up the OpenTelemetry Python SDK, see the documentation.

Python Version Support

This project ensures compatibility with the current supported versions of the Python. As new Python versions are released, support for them is added and as old Python versions reach their end of life, support for them is removed.

We add support for new Python versions no later than 3 months after they become stable.

We remove support for old Python versions 6 months after they reach their end of life.

Documentation

The online documentation is available at https://opentelemetry-python.readthedocs.io/. To access the latest version of the documentation, see https://opentelemetry-python.readthedocs.io/en/latest/.

Install

This repository includes multiple installable packages. The opentelemetry-api package includes abstract classes and no-op implementations that comprise the OpenTelemetry API following the OpenTelemetry specification. The opentelemetry-sdk package is the reference implementation of the API.

Libraries that produce telemetry data should only depend on opentelemetry-api, and defer the choice of the SDK to the application developer. Applications may depend on opentelemetry-sdk or another package that implements the API.

The API and SDK packages are available on the Python Package Index (PyPI). You can install them via pip with the following commands:

pip install opentelemetry-api
pip install opentelemetry-sdk

The exporter/ directory includes OpenTelemetry exporter packages. You can install the packages separately with the following command:

pip install opentelemetry-exporter-{exporter}

The propagator/ directory includes OpenTelemetry propagator packages. You can install the packages separately with the following command:

pip install opentelemetry-propagator-{propagator}

To install the development versions of these packages instead, clone or fork this repository and perform an editable install:

pip install -e ./opentelemetry-api -e ./opentelemetry-sdk -e ./opentelemetry-semantic-conventions

For additional exporter and instrumentation packages, see the opentelemetry-python-contrib repository.

Contributing

For information about contributing to OpenTelemetry Python, see CONTRIBUTING.md.

We meet weekly on Thursdays at 9AM PST. The meeting is subject to change depending on contributors' availability. Check the OpenTelemetry community calendar for specific dates and Zoom meeting links.

Meeting notes are available as a public Google doc.

The meeting is open for all to join. We invite everyone to join our meeting, regardless of your experience level. Whether you're a seasoned OpenTelemetry developer, just starting your journey, or simply curious about the work we do, you're more than welcome to participate!

Maintainers

For more information about the maintainer role, see the community repository.

Approvers

For more information about the approver role, see the community repository.

Emeritus

For more information about the emeritus role, see the community repository.

Thanks to all of our contributors!

Repo contributors

Frequently asked questions

Is opentelemetry-python free to use?

opentelemetry-python is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does opentelemetry-python do?

OpenTelemetry Python API and SDK

What is opentelemetry-python written in?

opentelemetry-python is primarily written in Python. Its source is publicly available at https://github.com/open-telemetry/opentelemetry-python, and it has 2,702 GitHub stars.