cecilphillip / grafana-otel-dotnet

Sample setup showing ASP.NET Core observability with Prometheus, Loki, Grafana, Opentelemetry Collector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASP.NET Core observability w/ Grafana OSS Stack

Sample application showing how to write up ASP.NET Core with OpenTelemetry and export to Prometheus, Loki, and Tempo using the OpenTelemetry Collector

Prerequisites

Setup

The demo is made up of a few projects written in C#.

  • Web API - Backend HTTP Weather API built with ASP.NET Core
  • Website - Front facing UI using the default Blazor Server template

Configured Ports πŸ”Œ

Application Port(s)
Web API 5006
Website 5238
Loki 3100
Prometheus UI 9090
Grafana UI 3000
OpenTelemetry Collector 4317, 4318

Running the demo πŸš€

Run the infrastructure components with the provided docker-compose.yml file.

>  docker compose -p grafana-demo up   

πŸ‘€ This setup will create a ./tmp/ folder in the root of the project folder that will be mounted as a volume in the infrastructure containers.

Start both .NET applications

Backend Web API

> cd src/BackendApiService
> dotnet run 

Front facing web API

> cd src/MainService
> dotnet run 

About

Sample setup showing ASP.NET Core observability with Prometheus, Loki, Grafana, Opentelemetry Collector

License:MIT License


Languages

Language:C# 49.7%Language:HTML 27.3%Language:CSS 23.1%