The Instana Python package: Python Distributed Tracing & Metrics Sensor.
Instana AutoTrace™ is a next-generation distributed tracing and service discovery technology powering Instana’s fully automatic, no-effort, and instant observability experience.
The Instana Host agent automatically finds and instruments your running Python applications with no required user steps or restarts.
The Instana Python package is a zero-configuration tool that automatically collects key metrics and distributed traces from your Python processes.
Instana remotely instruments your Python applications automatically by Instana AutoTrace™. However, if you want to install the package manually, see Manual Installation.
The Instana Host agent automatically finds and instruments your running Python applications. However, you can manually install the package.
To instrument your applications, manually install the package into the virtualenv, pipenv, or container (hosted on pypi) by running this command:
pip install instana
To update an existing installation, run this command:
pip install -U instana
To activate the Instana package without any code changes, set this environment variable for your Python application:
The Instana Python package automatically instruments your Python application, and when it locates the Instana host agent, it begins to report Python metrics and distributed traces.
Alternatively, to manually import the
instana package to inside your Python application, run this command:
For additional information about Django, Flask, End-user Monitoring (EUM), and more, see the Installation document.
For out of the box metrics and distributed tracing, no configuration is required. However, individual components are configurable. For more information, see the Python configuration.
For information on how to ensure that your instrumented applications can contact the Instana Host Agent, see the documentation.
Using the Instana REST API, the Python package includes an API client to download metrics, views, events, and more, that are displayed on your Instana dashboard.
For information and examples on how to use the Python API client, see the documentation.
The Instana Python package supports custom tracing via OpenTracing APIs. See the OpenTracing page for more information.
Seeing something unexpected or having trouble trying to configure something? See the Python Troubleshooting page for help.
For the Instana Python package release history, including changes made to the package, see the Github Releases page.