Python components and frameworks supported by ARMS Application Monitoring
This topic lists the Python versions, third-party components, and frameworks that the Python agent supports.
Supported Python versions
Supported Protobuf versions
The Python agent uses Protobuf for data encoding and reporting. This may conflict with the Protobuf version that your application uses. The Python agent is compatible with the following Protobuf versions:
"protobuf>=3.20.0, < 7.0"Integrating the agent may change the versions of some of your dependencies, such as Protobuf. To prevent unexpected errors caused by dependency version changes, use one of the following methods:
If you have already installed a dependency, such as Protobuf, run the following command to increase its priority:
# View the package installation path
python3 -m site
# The output is similar to the following
sys.path = [
'/app',
'/usr/local/lib/python3.9',
'/usr/local/lib/python3.9/site-packages'
]
# Set the PYTHONPATH environment variable to prioritize your dependency version
# Use colons (:) to separate different paths
export PYTHONPATH=/app:/usr/local/lib/python3.9:/usr/local/lib/python3.9/site-packagesIf Method 1 does not resolve the issue, manually install the Python agent. After you integrate the agent, run the following command to force a specific dependency version:
pip3 install xx==${your_original_dependency_version} --force-reinstall
Supported OpenTelemetry API versions
The Python agent is implemented based on the OpenTelemetry API specification. Because different versions of the OpenTelemetry API may have minor differences, the Python agent supports the following range of OpenTelemetry API versions:
"opentelemetry-api <= 1.40.0"Python framework compatibility
Review these framework-specific requirements before you proceed.
uvicorn
If your application starts with uvicorn, choose one of the following approaches:
Approach A: Import the agent in code. Add this import statement to the first line of your uvicorn entry file:
from aliyun.opentelemetry.instrumentation.auto_instrumentation import sitecustomizeApproach B: Switch to gunicorn with the aliyun-instrument prefix. Replace your uvicorn command:
# Before
uvicorn app:app --workers 4 --port=9090 --host 0.0.0.0
# After
aliyun-instrument gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 app:appThe aliyun-instrument prefix handles initialization and non-intrusive instrumentation of the ARMS Python agent.
uWSGI
If your application starts with uWSGI, see Install the Python agent for a Django or Flask project that starts with uWSGI.
gevent
If you use gevent coroutines, set the GEVENT_ENABLE environment variable to true.
For example, if your code contains:
from gevent import monkey
monkey.patch_all()Set the following environment variable in your deployment:
GEVENT_ENABLE=trueDatabase frameworks
Supported plug-in versions
LLM (large language model) applications
Component | PyPI/GitHub repository address | Minimum version | Later versions |
AgentScope | v1.0 | v1.0.10 | |
Anthropic SDK | v0.16.0 | v0.111.0 | |
Claude Agent SDK | v0.1.0 | No limit | |
CrewAI | v0.1.0 | v1.7.2 | |
Dashscope | v1.0.0 | v1.2.1 | |
Dify | v0.12.8 | v1.11.2 | |
Dify Plugin | No limit | No limit | |
Dify React | v0.1.0 | v0.1.0 | |
Google ADK | v1.2.1 | v1.21.0 | |
Hermes Agent | v0.12.0 | v0.16.0 | |
LangChain | v0.1.0 | v1.2.0 | |
LangGraph | No limit | v1.0.5 | |
LiteLLM | v1.0.0 | v1.79.0 | |
Llama-index | v0.10.5 | v0.10.43 | |
MCP | v1.3.0 | v1.25.0 | |
OpenAI | v1.0.0 | v2.14.0 | |
OpenAI Agent | v0.3.3 | v0.6.6 | |
Qwen-Agent | v0.0.20 | v0.0.34 | |
QwenPaw | v1.1.0 | v1.1.11 | |
RagFlow | v0.14.0 | v0.21.1 |
LLM (large language model) services
Component | PyPI/GitHub repository address | Previous versions | Later versions |
SGLang | v0.4.6 | v0.4.9.post6 | |
vLLM V0 | v0.5.0 | v0.8.4 | |
vLLM V1 | V0.8.2 | V0.16.0 |
HTTP/RPC frameworks
Component | PyPI/GitHub repository address | Earlier versions | Later versions |
aiohttp | v3.0 | No limit | |
asgiref | v3.0 | No limit | |
BlackSheep | v1.2.0 | No limit | |
Click | v8.1.3 | < 9.0.0 | |
Django | v1.10 | No limit | |
Falcon | v1.4.1 | < 5.0.0 | |
FastAPI | v0.92 | No limit | |
Flask | v1.0 | No limit | |
gRPC | v1.42.0 | No limit | |
HTTPX | v0.18.0 | No limit | |
Jinja2 | v2.7 | < 4.0 | |
Pyramid | v1.7 | No limit | |
Requests | v2.0 | No limit | |
Starlette | v0.13 | No limit | |
Tornado | v5.1.1 | No limit | |
urllib | No specific dependency | No specific version requirement | No limit |
urllib3 | v1.0.0 | < 3.0.0 | |
WSGI | None | No limit | No limit |
Vector databases
Component | PyPI/GitHub repository address | Minimum version | Later versions |
milvus | v2.4.1 | No limit |
Memory frameworks
Component | PyPI/GitHub repository address | Minimum version | Later versions |
mem0 | v1.0.0 | v1.0.2 |
Database frameworks
Component | PyPI/GitHub repository address | Previous version | Later versions |
aiopg | v0.13.0 | < 2.0.0 | |
AsyncPG | v0.12.0 | No limit | |
DBAPI | No specific dependency | No specific version requirement | No limit |
MySQL | v8.0 | < 10.0 | |
MySQLClient | No specific version requirement | < 3 | |
psycopg | v3.1.0 | No limit | |
psycopg2 | v2.7.3.1 | No limit | |
Pydantic | v1.10.2 | No limit | |
PyMongo | v3.1 | < 5.0 | |
PyMSSQL | v2.1.5 | < 3 | |
PyMySQL | No specific version requirement | < 2 | |
SQLAlchemy | v1.0.0 | < 2.1.0 | |
SQLite3 | No specific dependency | No specific version requirement | No limit |
TortoiseORM | v0.17.0 | No limit |
Cache plug-ins
Component | PyPI/GitHub repository address | Older version | Later versions |
Cassandra | v3.25 | No limit | |
Elasticsearch | v6.0 | No limit | |
PyMemcache | v1.3.5 | < 5 | |
Redis | v2.6 | No limit | |
Scylla | v3.25 | No limit |
Message Queue Plugin
Component | PyPI/GitHub repository address | Older versions | Later versions |
aio-pika | No specific version requirement | No limit | |
aiokafka | No specific version requirement | No limit | |
Celery | v4.0 | < 6.0 | |
Confluent Kafka | v1.8.2 | v2.7.0 | |
Kafka Python | No specific version requirement | No limit | |
Pika | No specific version requirement | No limit | |
Remoulade | v0.50 | No limit |
Other plug-ins
Component | PyPI/GitHub repository address | Earlier versions | Later versions |
asyncio | No specific dependency | No specific version requirement | No limit |
Logging | No specific dependency | No specific version requirement | No limit |
Loguru | v0.5.0 | v1.0 | |
Threading | No specific dependency | No specific version requirement | No limit |