What is opentelemetry
OpenTelemetry is an open-source observability framework for instrumenting, collecting, and exporting telemetry data—traces, metrics, and logs—from distributed systems and modern applications
git clone https://github.com/uchiha-vivek/Monitoring-performance-with-opentelemetry-and-prometheus.git
cd Monitoring-performance-with-opentelemetry-and-prometheusMake virtual environment
python -m venv venvActivate the environment
venv\Scripts\activateInstall the requirements
pip install -r requirements.txtrun the main file
python app.pyMake sure to run docker dameon :
- open the docker desktop
docker-compose up -dHit the following endpoint to view the JAEGER GUI
http://localhost:16686/search
- Select the service you defined in tracing.py . In our case its ecommerce-backend
- In the operation panel , you can see the METHOD and the endpoint
The info you can view
- you can see the http method
- you can view the external api being used here
- you can view the system defined route
/api/v1/route - you can see the otel.scope.name and otel.library.name
- service name is also mentioned
- you can view the duration of the api request
Hit the following endpoints
Endpoint 1:
http://localhost:5000/api/v1/productsendpoint 2:
http://localhost:5000/api/v1/products/1- will be deploying the code in Azure web app
- enabling azure analytics by using azure-monitor-telemetry
- reference material for setting up opentelemetry in azure - LINK
- enabling prometheus for spikes and latency