This directory includes an example asyncio application and client with aiohttp and aio-pika used for testing.
- Python 3.8 or greater
- instana, aiohttp and aio-pika Python packages installed
- A RabbitMQ server with it's location specified in the
RABBITMQ_HOSTenvironment variable
-
Make sure the Instana Python package is installed or you have this git repository checked out.
-
Set the environment variable
AUTOWRAPT_BOOTSTRAP=instanafor immediate instrumentation. -
Boot the aiohttpserver.py file as follows. It will launch an aiohttp server that listens on port localhost:5102. See the source code for published endpoints.
python aiohttpserver.py- Boot the
aiohttpclient.pyfile to generate a request (every 1 second) to the aiohttp server.
python aiohttpclient.pyFrom here, you can modify the aiohttpclient.py file as needed to change requested paths and so on.
Some example traces from local tests.
aiohttp client calling aiohttp server:

aiohttp server making multiple aio-pika calls (publish & consume)
