This topic lists the Python versions, third-party components, and frameworks supported by the Python agent for Application Real-Time Monitoring Service (ARMS).
Supported versions
Python: ≥ V3.8
Protobuf: ≥ V3.20.0 and < V6.0 (versions outside this range may conflict with agent encoding)
OpenTelemetry API: < V1.35.0 (agent behavior may vary slightly across API versions)
Supported Protobuf versions
The Python agent uses protobuf for data encoding, which may conflict with the protobuf version that your application uses. The Python agent is compatible with the following protobuf versions:
"protobuf>=3.20.0, < 6.0"Supported OpenTelemetry API versions
The Python agent is based on the OpenTelemetry API specification. Different versions of the OpenTelemetry API may have slight variations. The Python agent supports the following OpenTelemetry API versions:
"opentelemetry-api <= 1.35.0"Usage notes
If the application is started by using Uvicorn, replace the command to install the agent.
For example, if the following command is used to start your application:
uvicorn -w 4 -b 0.0.0.0:8000 app:appReplace the command with the following:
aliyun-instrument gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 app:appNoteThe
aliyun-instrumentcommand initializes the ARMS agent for Python and instruments data in a non-intrusive way.If you use gevent coroutines, set the environment variable
GEVENT_ENABLE=true.Example:
from gevent import monkey monkey.patch_all()Run the following command to set the environment variable:
GEVENT_ENABLE=true
Supported components
Large language model (LLM) applications
Component | Python Package Index (PyPI) Repository address | Minimum version | Maximum version |
OpenAI | V1.0.0 | V1.84.0 | |
Dashscope | V1.0.0 | V1.2.1 | |
Llama-index | V0.10.5 | V0.10.43 | |
Langchain | V0.1.0 | V0.3.27 | |
Dify | V0.12.8 | V1.4.3 | |
Model Context Protocol (MCP) | V1.3.0 | V1.12.4 |
LLM services
Component | Python Package Index (PyPI) Repository address | Minimum version | Maximum version |
vLLM V0 | V0.5.0 | V0.8.4 | |
vLLM V1 | V0.8.2 | V0.8.4 | |
SGLang | V0.4.6 | V0.4.9.post6 |
RPC frameworks
Component | PyPI Repository address | Minimum version | Maximum version |
FastAPI | V0.58 | N/A | |
asgiref | V3.0 | N/A | |
aiohttp | V3.0 | N/A | |
Django | V1.10 | N/A | |
WSGI | None | N/A | N/A |
Flask | V1.0 | N/A | |
Requests | V2.0 | N/A |