Metrics in .NET – past and present
Even though we are focusing on distributed tracing in this book, learning about metrics is important to understand when and how to use them to improve observability.
Metrics allow us to report data that’s been aggregated over a certain period and set of attributes (that is, dimensions or tags). A metric can be represented as a set of time series where each series measures the change of one indicator with a unique combination of attribute values over time. Examples include CPU utilization for a given service instance or HTTP request latency for a given route, HTTP method, response code, and instance.
The key difference between traces and metrics is aggregation – traces capture individual operations with detailed attributes. Traces answer questions such as “What happened with this specific request?” and “Why did it happen?” Metrics, on the other hand, tell us what happens in the system or specific...