https://github.com/depechie/opentelemetrygrafana
OpenTelemetry and Grafana stack with Docker Compose or Aspire
https://github.com/depechie/opentelemetrygrafana
asp-net-core-web-api aspire docker docker-compose dotnet grafana loki observability opentelemetry opentelemetry-collector prometheus tempo
Last synced: 6 months ago
JSON representation
OpenTelemetry and Grafana stack with Docker Compose or Aspire
- Host: GitHub
- URL: https://github.com/depechie/opentelemetrygrafana
- Owner: Depechie
- License: mit
- Created: 2021-11-25T13:52:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T21:55:35.000Z (6 months ago)
- Last Synced: 2025-04-06T08:09:05.879Z (6 months ago)
- Topics: asp-net-core-web-api, aspire, docker, docker-compose, dotnet, grafana, loki, observability, opentelemetry, opentelemetry-collector, prometheus, tempo
- Language: C#
- Homepage:
- Size: 351 KB
- Stars: 80
- Watchers: 8
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenTelemetry together with the Grafana stack
This repository is a work in progress, about having an observability stack for your microservices environment.
> [!NOTE]
> Instead of using docker compose to start up the environment, you can also take a look at the repository using [.NET Aspire](https://github.com/dotnet/aspire) as orchestrator
> It is available on the aspire branch: [aspire orchestrated version](/../aspire)If you want to know/learn more, also check out my Pluralsight course on the subject here [https://www.pluralsight.com/library/courses/opentelemetry-grafana-observability](https://www.pluralsight.com/library/courses/opentelemetry-grafana-observability)
### Components used:
- ASP.NET Web API for demo services
- RabbitMq as message queue
- OpenTelemetry Collector as middle man for tracing and logs
- BlackBox and Prometheus for service metrics and health checks
- Loki for log aggregation
- Tempo for tracing aggregation
- Grafana for overall dashboarding### Remarks:
For alert provisioning we can extract the JSON through use of the Grafana API: [https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
This sample is sending logs from SeriLog to OpenTelemetry in OTLP format and OpenTelemetry will pass it along to Loki.
### Usage:
```
docker compose -f docker-compose-mac.yml --profile all up -d
docker compose -f docker-compose-mac.yml --profile all down
```