#Monitor Outgoing HTTP Requests

16 messages · Page 1 of 1 (latest)

fallen needle
#

Our service relies on many third party apis, and it is hard for us to keep track of how often the apis get called, how often they succeed and fail - if they fail then with what status code.
I am wondering if someone knows an easy way to visualize something like this with NestJs!

I would greatly appreciate help, thanks a lot!

crimson whale
#
fallen needle
rose hinge
#

Do you need to trace which exact calls failed with what exact code, or do you just want some statistics? If the latter, then the tool for that is called Prometheus and you can plug it into your app to generate all sorts of metrics, which you then scrape and visualize using some observability tool (like grafana)

#

There's nothing Nest specific to it. Maybe except using a nest-specific integration of Prometheus

fallen needle
fallen needle
# rose hinge Yes, definitely

Ok, thanks a lot! I have 0 experience with Prometheus. Do you know a good place to get started with Prometheus in a NestJs application in this context (tracking the API stats)

rose hinge
# fallen needle Ok, thanks a lot! I have 0 experience with Prometheus. Do you know a good place ...

Here's a great intro video https://youtu.be/STVMGrYIlfg

Get a quick high-level overview of the key concepts of the Prometheus monitoring system straight from the co-founder of Prometheus.

This video explains what Prometheus is, what the system architecture looks like, and what the main features and concepts are that make Prometheus-based monitoring so powerful: the dimensional data model, the text-b...

▶ Play video
#

Anything else is just a google search away

fallen needle
fallen needle
rose hinge
#

But if you want to know the payloads of each request, too, then you need to log them yourself. It's not a good practise to store payloads in traces

fallen needle
bronze berry