OpenTelemetry for Python
OpenTelemetry provides flexible and powerful support for Python applications. With both auto-instrumentation and manual APIs, you can easily capture traces, logs, and metrics from your services.Installation
To get started, install the OpenTelemetry packages:👉 OpenTelemetry Python Getting Started
Auto-Instrumentation
Auto-instrumentation lets you automatically trace common libraries such as HTTP clients, database drivers, and more without needing to modify your code. OpenTelemetry provides auto-instrumentation libraries for many popular languages, making it fast to get started with tracing. In Python, you can use the OpenTelemetry Distro package to automatically instrument your application:👉 Python Auto-Instrumentation Setup
Manual Instrumentation
Manual instrumentation gives you full control over your traces, allowing you to create spans wherever needed. You can customize span names, attributes, and relationships to capture the most important parts of your application’s flow. You can manually create spans and manage tracing in Python using the OpenTelemetry APIs:👉 Python Manual Instrumentation Guide