A sample application to get started with Flask and AWS X-Ray integration
- Install x-ray daemon locally
- Setup a Python virualenv and install requirements
python -m venv venv
pip install -r requirements.txt
- Create .env file. A sample available at .env.sample
- Start the application
python wsgi.py
- Generate some traffic
for id in {100..110}; do
curl -X POST "http://localhost:8080/${id}"
curl "http://localhost:8080/${id}"
sleep .25
done
- Visit AWS X-Ray Console and check the generated traces
AWS X-Ray
X-Ray SDK for Python middleware
Patching libraries to instrument downstream calls
Generating custom subsegements
AWS X-Ray Daemon