Python supported components and versions

AutoTrace webhook

The Instana AutoTrace WebHook can automatically instrument your Python processes across an entire Kubernetes cluster.

Python runtimes

Python Versions Python sensor version
CPython >= 3.7 and < 3.10 >= 2.0.0
CPython >= 2.7 and < 3.6 < 2.0.0

Long-term support

The official LTS and end-of-life (EOL) timeline from Python is followed.

Note: As soon as a Python version reaches its EOL date, at least one year and at most two years support is offered. Update your Python version regularly to avoid problems.

Platforms, operating systems and ecosystems

The Instana Python package supports a wide range of environments such as:

Platform
Linux OSX
AWS Fargate AWS Lambda
Kubernetes Google Cloud
Microsoft Azure IBM Bluemix
Digital Ocean Docker

Tracing

The Instana Python sensor supports distributed tracing across other Instana instrumented platforms, technologies and languages. It offers automatic tracing of all requests and supports OpenTracing. See the OpenTracing page for more details.

Frameworks Versions Python sensor version
ASGI >= 2.0 any
Celery >= 4.3.0 and <= 5.2.7 any
Django >= 1.11 and <= 4.1.7 any
FastAPI >= 0.51.0 and <= 0.93.0 any
Flask >= 0.12.0 and <= 2.2.3 any
Pyramid >= 1.6.5 and <= 2.0.1 any
Sanic >= 19.0.0 and < 21.9.0 >= 2.0.0
Starlette >= 0.12.13 and <= 0.25.0 any
Tornado >= 4.5.3 and < 6.0.0 < 2.0.0
Tornado >= 6.0.0 and <= 6.2.0 >= 2.0.0
Webapp2 >= 1.5 and < 3.0 < 2.0.0
WSGI PEP 333 >= 1.0 any
Clients Versions Python sensor version
aiohttp >= 3.1.0 and <= 3.8.4 any
asynqp >= 0.5.1 and <= 0.6 < 2.0.0
boto3 >= 1.15.0 and <= 1.26.73 any
couchbase >= 2.3.5 any
google-cloud-pubsub (*) <= 2.1.0 any
google-cloud-storage >= 1.24.0 and <= 2.7.0 any
grpcio >= 1.14.1 and <= 1.51.1 any
mysqlclient >= 1.3.14 and <= 2.1.1 any
pika >= 1.0.0 and <= 1.3.1 any
PyMySQL >= 0.6.7 and <= 1.0.2 any
pymongo >= 3.7.0 and <= 4.3.3 any
psycopg2 >= 2.7.2 and <= 2.9.5 any
redis >= 2.10.6 and <= 4.5.1 any
requests >= 2.16.1 and <= 2.28.2 any
SQLAlchemy >= 1.1.5 and <= 2.0.5.post1 any
urllib3 >= 1.18.1 and <= 1.26.14 any

(*): The current PubSub instrumentation supports only pull message delivery.

Logging Versions
logging >= 0.4.9.x
Other Versions
gevent >= 1.4 and <= 22.10.2

Tracing notes and limitations

Currently, the Instana Python package does not support tracing across thread boundaries. For example, when a request is first handled on a single thread, and then the workload is distributed to multiple other threads with the help of multiprocessing.ThreadPool, outgoing calls that happen in those other threads will not be captured. Because every exit span needs to have an entry span and the initiating entry span is out of the thread scope, such outgoing calls are not recorded. This is caused by the inherent characteristic of the default OpenTracing ThreadLocalScopeManager, and the lack of a ThreadPool specific scope manager.

Supported web servers

  • uWSGI
  • mod_wsgi
  • Nginx WSGI
  • uvicorn

Note: The gunicorn web server is not supported officially by the Instana Python package.

Sensor data collection

Tracked Configuration Metrics
Name GC Activity
Runtime Memory Usage
PID Threads
Loaded Modules Paging
I/O
Events
Context Switching

AutoProfile

Profiles Python versions Platforms
CPU usage >= 2.7 and >= 3.4 Linux, macOS
Memory allocation rate >= 3.4 Linux, macOS
Blocking calls >= 2.7 and >= 3.4 Linux, macOS

See also