Prometheus
Keeping an eye on your system’s vital metrics can help you pinpoint issues. If your system suddenly starts using a lot more memory, or if at certain times the CPU usage spikes, you might have a problem that needs fixing. Thus, it is important to track those metrics. As we just learned, we can use the PerformanceCounter
class to get the necessary information and do something with it, such as writing it to Seq with Serilog.
However, that is not the only way. There is nothing wrong with the combination of Serilog and Seq. However, their primary goal is to log events. You can use a tool such as Prometheus to track trends, such as CPU usage or memory pressure.
Prometheus is similar to Serilog and Seq: they allow you to write something in your code to an external system that you can look at in your web browser. However, Prometheus is primarily used for ad monitoring and time series databases. It is designed to record real-time metrics in a scalable fashion. It excels...