Python

Python OpenTelemetry在Python中的语言特定实现。

This is the OpenTelemetry Python documentation. OpenTelemetry is an observability framework – an API, SDK, and tools that are designed to aid in the generation and collection of application telemetry data such as metrics, logs, and traces. This documentation is designed to help you understand how to get started using OpenTelemetry Python.

Status and Releases

The current status of the major functional components for OpenTelemetry Python is as follows:

Traces Metrics Logs
Stable Stable Experimental

For releases, including the latest release, see Releases.

版本支持

OpenTelemetry-Python支持Python 3.6及更高版本。

安装

API和SDK包可以在PyPI上获得,并可以通过pip进行安装:

pip install opentelemetry-api
pip install opentelemetry-sdk

此外,还有一些可以单独安装的扩展包,如下所示:

pip install opentelemetry-exporter-{exporter}
pip install opentelemetry-instrumentation-{instrumentation}

这些分别是用于导出器和仪表盘包。Jaeger、Zipkin、Prometheus、OTLP和OpenCensus Exporters可以在存储库的exporter目录中找到。仪表盘和其他导出器可以在contrib存储库的instrumentationexporter目录中找到。

扩展

要查找与导出器、仪表盘库、追踪器实现等相关的项目,请访问Registry

安装Cutting-edge Packages

有一些功能尚未发布到PyPI。在这种情况下,您可能希望直接从存储库安装包。这可以通过克隆存储库并执行editable install来完成:

git clone https://github.com/open-telemetry/opentelemetry-python.git
cd opentelemetry-python
pip install -e ./opentelemetry-api
pip install -e ./opentelemetry-sdk

存储库和基准测试


入门指南

五分钟内获取应用的遥测数据!

手动仪表化

OpenTelemetry Python 的手动仪表化

自动仪表化

Exporters

技术手册

OpenTelemetry发行版

使用 mypy

API 参考文档

示例

最后修改 December 10, 2023: translate (a4350d6e)