The instana package provides Python metrics and traces (request, queue & cross-host) for Instana.
This package supports Python 2.7 or greater.
Any and all feedback is welcome. Happy Python visibility.
pip install instana
into the virtual-env or container (hosted on pypi)
For Django versions >= 1.10 set the following environment variable in your application boot environment and then restart your application:
export AUTOWRAPT_BOOTSTRAP=django
For Django version 1.9.x, instead set:
export AUTOWRAPT_BOOTSTRAP=django19
To enable the Flask instrumentation, set the following environment variable in your application boot environment and then restart your application:
export AUTOWRAPT_BOOTSTRAP=flask
Note: When the Django or Flask instrumentation is used, runtime monitoring is automatically included. Use this section if you only want to see runtime metrics.
To enable runtime monitoring (without request tracing), set the following environment variable in your application boot environment and then restart your application:
export AUTOWRAPT_BOOTSTRAP=runtime
This Python instrumentation spawns a lightweight background thread to periodically collect and report process metrics. By default, the GIL and threading is disabled under uWSGI. If you wish to instrument your application running under uWSGI, make sure that you enable threads by passing --enable-threads
(or enable-threads = true
in ini style). More details in the uWSGI documentation.
If you use uWSGI in forking workers mode, you must specify --lazy-apps
(or lazy-apps = true
in ini style) to load the application in the worker instead of the master process.
The instana package will automatically collect key metrics from your Python processes. Just install and go.
This Python package supports OpenTracing.
You can find more documentation covering supported components and minimum versions in the Instana documentation portal.
Bug reports and pull requests are welcome on GitHub at https://github.com/instana/python-sensor.
Want to instrument other languages? See our Nodejs, Go, Ruby instrumentation or many other supported technologies.