This is an ASP.NET Core 8 Backend with OpenTelemetry integration for collecting metrics, traces, and logs. The collected data is sent to an OpenTelemetry Collector, which forwards it to Prometheus, Tempo, and Loki. Grafana is used for visualization. The Backend features a basic authentication using AspNet.Identity with an integrated Email-Sender.
The backend includes:
/Frontend
folder, built via npm build
, and automatically placed in wwwroot
.appsettings.json
.All services run in the same Docker Compose environment using standard ports.
git clone https://github.com/your-repo.git
cd your-repo
Modify appsettings.json
or environment variables for:
ConnectionStrings:DefaultConnection
)EmailSender
section)
As well as grafana, Otel-collector, tempo, Loki and prometheus config-files at the project root.docker-compose up --build
This will:
wwwroot
.appsettings.json
.dotnet build
dotnet run
cd Frontend
npm install
npm run build
copy dist ../wwwroot
cd Frontend
npm install
npm run build
npm run dev
The backend sends:
Grafana reads from Prometheus, Tempo, and Loki for visualization. Login to Grafana, add Prometheus, Tempo and Loki as Datasources and use an Otel-Dashboard of your choice. However, the deployed grafana does not automatically display the dashboard and the datasources. You simply have to add them, import an AspNet-Otel dashboard of your choice and you're done! Since grafana is deployed in docker (like the other services) you may not be able to address it directly via grafana's localhost but have to address it using its container name.
Service | URL |
---|---|
API (Swagger) | http://localhost:8080/swagger |
Svelte - Frontend | http://localhost:8080 |
Svelte - Request Password | http://localhost:8080/request-password |
Grafana | http://localhost:3000 |
Prometheus | http://localhost:9090 |
Tempo (Traces) | http://localhost:3200 |
Loki (Logs) | http://localhost:3100 |
Feel free to submit pull requests or open issues!
Apache2.0 License