Search code examples
.netprometheusmetricstraefik

Measure outgoing HTTP requests for .NET app with Prometheus


I have a .NET app running on K8s. It sends a lot of HTTP requests to external services and I'd like to have more visibilty. Traefik runs as a proxy but I'm considering replacing it with Ambassador

For monitoring I use Prometheus. It works very well with Traefik but gives me only metrics about incoming HTTP requests Prometheus library for .NET looks good https://github.com/prometheus-net/prometheus-net but also unclear if it gives outgoing HTTP calls metrics or not

Any help or suggestions are appreciated


Solution

  • Answer 1: I ended up adding log line for every outgoing request, transport to ElasticSearch and counting number of requests in Kibana

    Answer 2: you can deploy service mesh to your K8s cluster (Linkerd, Istio, Maesh or whatever) and make it transport tracing metrics to Prometheus