入门指南
五分钟内获取应用的遥测数据!
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.
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存储库的instrumentation和exporter目录中找到。
要查找与导出器、仪表盘库、追踪器实现等相关的项目,请访问Registry。
有一些功能尚未发布到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