Repolode
open-telemetry

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. 1

    Install the API package from PyPI

    pip install opentelemetry-api
  2. 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