{"repo":"blueswen/fastapi-observability","free":true,"listed":false,"github":"https://github.com/blueswen/fastapi-observability","clone":"git clone https://github.com/blueswen/fastapi-observability.git","description":"Observe FastAPI app with three pillars of observability: Traces (Tempo), Metrics (Prometheus), Logs (Loki) on Grafana through OpenTelemetry.","language":"Python","stars":1117,"topics":["fastapi","grafana","loki","opentelemetry","prometheus","tempo","openmetrics","observability"],"license":"MIT","category":"analytics","readme_excerpt":"FastAPI with Observability Observe the FastAPI application with three pillars of observability on Grafana: 1. Traces with Tempo and OpenTelemetry Python SDK 2. Metrics with Prometheus and Prometheus Python Client 3. Logs with Loki Table of contents - FastAPI with Observability - Table of contents - Quick Start - Explore with Grafana - Metrics to Traces - Traces to Logs - Logs to Traces - Detail - FastAPI Application - Traces and Logs - Span Inject - Metrics - OpenTelemetry Instrumentation - Prometheus - Metrics - Prometheus Config - Grafana Data Source - Tempo - Traces - Grafana Data Source - Loki - Logs - Loki Docker Driver - Grafana Data Source - Grafana - Reference Quick Start 1. Install Loki Docker Driver 2. Start all services with docker-compose If got the error message Error response from daemon: error looking up logging plugin loki: plugin loki found but disabled , please run the following command to enable the plugin: 3. Send requests with siege and curl to the FastAPI app Or you can use Locust to send requests: Or you can send requests with k6: 4. Check predefined dashboard FastAPI Observability on Grafana http://localhost:3000/ login with admin:admin Dashboard screenshot: The dashboard is also available on Grafana Dashboards. Explore with Grafana Grafana provides a great solution, which could observe specific actions in service between traces, metrics, and logs through trace ID and exemplar. Image Source: Grafana Metrics to Traces Get Trace ID from an exemplar in me","default_branch":null,"files":null,"tree":[],"storefront":"/r/blueswen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/blueswen/fastapi-observability/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}