Applying metrics to gRPC
Metrics are fundamentally different from log messages. Typically, metrics would represent fairly basic measurements, such as counters, durations, and so on. But they can work nicely alongside logging. For example, if you are counting errors, you can see when they occur, and you can then query the logs for this specific period of time. Likewise, if you measure request latency, you can see when it goes above the acceptable threshold. And then you can query the logs produced within the same period to find out exactly what was happening inside your application.
Metrics are typically stored in a time series database, such as Prometheus, InfluxDB, or TimescaleDB. Because metrics represent simple data, they can be easily aggregated and plotted on a time series graph. For example, Grafana software was specifically designed to visualize metrics information. It can plot metrics on graphs similar to that in the following figure: