Python supported components and versions

To make sure that the Instana Python package is compatible with your current setup, review the supported components and versions for the Instana Python package. For more information about monitoring Python applications, see Monitoring Python.

Instana AutoTrace webhook

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

Python runtimes

Instana Python 2.5.4 and earlier versions supports tracing for the Tornado, asyncio, and aiohttp libraries only on Python runtimes up to 3.10.

Table 1. Supported Python runtimes
Python Versions Instana Python package version
CPython >= 3.8 and <= 3.13 >= 3.0.0
CPython >= 3.8 and < 3.13 >= 2.5.0
CPython >= 3.7 and < 3.10 < 2.5.0
CPython >= 2.7 and <= 3.6 < 2.0.0

Long-term support

Instana follows the official long-term support (LTS) and end-of-life (EOL) timeline from Python.

When a Python version reaches its EOL date, Instana offers one more year of support period. To avoid problems, update your Python version regularly.

Supported environments

The Instana Python package supports a wide range of environments.

Platforms

The following platforms and CPU architectures are supported:

Table 2. Supported platforms
Platform x86_64/amd64 ppc64le s390x aarch64/arm64
Linux
AWS Fargate
AWS Lambda
Kubernetes
Google Cloud
Containers[1]

Tracing

The Instana Python package supports distributed tracing across other Instana instrumented platforms, technologies, and languages.

The "Instana Python package version" column provides additional information about versioning restrictions. The "Instana Python package version" column value Any means the package version >= 3.0.0.

Specification support

The following table lists the specifications supported by the Instana Python package:

Table 3. Specification support
Specification Support policy Minimum version Maximum version Instana Python package version
ASGI 45 days 2.0.0 3.0.0 Any
WSGI 0 day PEP 333 1.0 PEP 3333 1.0.1 Any

HTTP

The following tables list the HTTP frameworks and libraries that are supported by the Instana Python package:

Web frameworks

The following table lists the HTTP web frameworks supported by the Instana Python package:

Table 4. Supported HTTP web frameworks
Framework Support policy Minimum version Maximum version Instana Python package version
Django 45 days 1.11.0 5.2.4 Any
FastAPI 45 days 0.51.0 0.115.14 Any
Flask 45 days 0.12.0 3.1.1 Any
Pyramid 45 days 1.6.5 2.0.2 Any
Sanic On demand 21.9.0 25.3.0 Any
Starlette 45 days 0.12.13 0.47.1 Any
Tornado 45 days 6.0.0 6.5.1 Any

Clients and libraries

The following tables list the HTTP clients and libraries supported by the Instana Python package:

Table 5. Supported HTTP clients and libraries
Library Support policy Minimum version Maximum version Instana Python package version
Aiohttp 45 days 3.1.0 3.12.13 Any with Python == 3.8
Aiohttp 45 days 3.1.0 3.12.11 Any with Python >= 3.9
Httpx 45 days 0.20.0 0.28.1 >= 3.5.0
Requests 45 days 2.16.1 2.32.4 Any
Urllib3 45 days 1.26.5 2.5.0 Any

RPC

The following tables list the RPC libraries supported by the Instana Python package:

Table 6. Supported RPC libraries
Library Support policy Minimum version Maximum version Instana Python package version
Grpcio 45 days 1.14.1 1.73.1 Any
Spyne 45 days 2.13.1a0 2.14.0 >= 3.4.0 with Python < 3.12

Databases

The following tables list the database libraries supported by the Instana Python package:

Table 7. Supported database libraries
Library Support policy Minimum version Maximum version Instana Python package version
AWS DynamoDB[2] 45 days 1.15.0 1.39.3 Any
AWS S3[2:1] 45 days 1.15.0 1.39.3 Any
Cassandra-driver 45 days 3.20.2 3.29.2 Any
Couchbase On demand 2.3.5 2.5.12 Any
Mysqlclient 45 days 1.3.14 2.2.7 Any
PyMySQL 45 days 0.6.7 1.1.1 Any
Pymongo 45 days 3.7.0 4.13.2 Any
Psycopg2 45 days 2.7.2 2.9.10 Any
Redis 45 days 2.10.6 6.2.0 Any
SQLAlchemy 45 days 1.1.5 2.0.41 Any

Messaging

The following tables list the messaging libraries supported by the Instana Python package:

Table 8. Supported messaging libraries
Library Support policy Minimum version Maximum version Instana Python package version
Aioamqp 45 days 0.15.0 0.15.0 >= 3.4.0
Aio-pika 45 days 9.1.0 9.5.5 >= 3.5.0
Confluent Kafka 45 days 2.0.0 2.11.0 >= 3.4.0
Kafka-python 45 days 2.0.0 2.2.15 >= 3.4.0 with Python < 3.12
Kafka-python-ng 45 days 2.0.0 2.2.3 >= 3.4.0 with Python >= 3.12
Pika 45 days 1.0.0 1.3.2 Any

Cloud Services

The following tables list the cloud services libraries supported by the Instana Python package:

Table 9. Supported cloud services libraries
Library Support policy Minimum version Maximum version Instana Python package version
Boto3 (AWS SDK) 45 days 1.15.0 1.39.3 Any
Google-cloud-pubsub [3] 45 days 2.0.0 2.30.0 Any
Google-cloud-storage 45 days 1.24.0 3.1.1 Any

Python built-in modules

The following tables list the Python built-in libraries supported by the Instana Python package:

Table 10. Supported Python built-in libraries
Library Support policy Minimum version Maximum version Instana Python package version
Asyncio 0 day 1.4 23.7.0 Any
Logging 0 day 4.3.0 5.5.3 Any

Other libraries

The following tables list the other libraries supported by the Instana Python package:

Table 11. Other supported libraries
Library Support policy Minimum version Maximum version Instana Python package version
Gevent On demand 1.4 23.7.0 Any
Celery 45 days 4.3.0 5.5.3 Any

Tracing notes and limitations

Check out the permissions and limitations of the Instana Python Tracer.

Thread starting permission

The Instana Python tracer needs permission to create and start Python threading.Timer objects. On most systems, this permission is granted by default. In some nested containerization scenarios, for example in some Docker-in-Docker container versions, the permission is not granted by default.

If you see exceptions like RuntimeError: can't start new thread, then insufficient permissions are the most likely cause. If you upgrade or change the Docker-in-Docker container, but the needed permissions are not granted for the internal application container, then you can use the --privileged permission as a last resort to start the application container.

Tracing across thread boundaries

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 are not 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.

Tracing non-async functions in FastAPI

The Instana Python package supports only the tracing of coroutine-based concurrency in FastAPI. This is because the non-async functions that are executed on a thread pool cannot be followed through thread boundaries.

Tracing with multiple tracers

It is not supported to trace a single Python application with Instana and a third-party tracer, for example, with New Relic tracer or OpenTelemetry at the same time.

Supported web servers

The Instana Python package supports the following web servers:

  • uWSGI
  • Gunicorn
  • mod_wsgi
  • Nginx WSGI
  • uvicorn

Sensor data collection

The Instana Python sensor gathers the following data:

Tracked configuration

The Instana Python sensor collects the following configuration data:

  • Name
  • Runtime
  • PID
  • Loaded modules

Metrics

The Instana Python sensor collects the following metrics:

  • GC activity
  • Memory usage
  • Threads
  • Paging
  • I/O
  • Events
  • Context switching

AutoProfile

The Instana Python package generates the following profiles:

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

Additional information


  1. Docker, Podman, and Rancher are the supported container engines and container management tools. ↩︎

  2. AWS DynamoDB and AWS S3 are instrumented through the Boto3 package. ↩︎ ↩︎

  3. The Instana Python package supports only the pull message delivery of Google Pub/Sub. ↩︎