This guide covers Python applications running on ECS, EC2, Kubernetes, or any container/VM environment. For AWS Lambda, see the Python Lambda guide.
1. Install the OpenTelemetry SDK
2. Install Instrumentation Libraries
opentelemetry-bootstrap automatically detects your installed packages (Django, FastAPI, Boto3, etc.) and installs the matching instrumentation libraries.
3. Install the Resource Detector Package
Install the resource detector package for the platform your application is running on.- AWS
- Kubernetes
- Containers
4. Set Environment Variables
Add these environment variables to your service. ReplaceYOUR_TRACE0_ENV_API_KEY with the API key from your Trace0 environment.
If your application is running on AWS, set the following additional environment variable for your deployment platform.
- ECS
- EKS
- EC2
- Elastic Beanstalk
5. Kubernetes Setup
If your application runs on Kubernetes, includingAmazon EKS, Google Kubernetes Engine or Azure Kubernetes Service, add the following environment variables to your container specification.