Skip to content

bereldhuin/opentelemetry-python-grafana-mlt

 
 

Repository files navigation

opentelemetry-python-grafana-mlt

This project is a demonstration of how observability can be implemented in microservices/distributed systems that are built with python/django. For monitoring, the MLT observability triad is collected:

  • Metrics
  • Logs
  • Traces

To see the complete article/tutorial, go to rafed.github.io/devra/posts/cloud/django-mlt-observability-with-opentelemetry/.

Open source technologies listed below are used to collect MLT data:

  1. Grafana [Dashboard]: This is a dashboard where we will observe the MLT data collected by the rest of the services.
  2. Prometheus [Monitoring]: Collects and stores metrics from applications.
  3. Promtail [Logging]: Collects log data from applications and sends them to Loki.
  4. Loki [Logging]: Aggregates and stores all logs sent by Promtail.
  5. Opentelemetry [Tracing]: Instruments an app to collect traces and sends them to Jaeger.
  6. Jaeger [Tracing]: Collects and stores tracing information. Also helps in trace visualization.

The following figure summarizes the technology dependencies.

MLT in kubernetes

To run the project, follow the steps below.

$ git clone https://github.com/rafed/opentelemetry-python-grafana-mlt

$ cd opentelemetry-python-grafana-mlt

$ docker-compose up

Make some requests on the webapp localhost:8000/service to generate MLT data. Then, go to localhost:3000 to view the grafana dashboard. Login using username:admin and password:admin.

grafana

Go to explore and you should be able to see MLT data collected from the apps. Check demo below.

Grafana dashboard

grafana explore

Logs from Loki

loki logs

Metrics from Prometheus

prometheus

Traces from Jaeger

Jaeger traces Jaeger traces split screen

To see the complete article/tutorial, go to rafed.github.io/devra/posts/cloud/django-mlt-observability-with-opentelemetry/.

About

Opentelemetry implementation in Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.4%
  • HTML 3.5%
  • Dockerfile 2.1%