From the course: Microservices: Design Patterns
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Metrics aggregation patterns
From the course: Microservices: Design Patterns
Metrics aggregation patterns
- In a similar vein to log aggregation, operationally, metrics are an invaluable tool to diagnosing issues. In fact, metrics can be more operationally useful than logging if used correctly. Metrics are also easier than logging because there's really less human interaction. Logging relies on a developer to write and structure the log message. Metrics, however, usually just requires a bit of instrumentation. The problem we're looking to solve is that we need to know what is going on with the system as a whole, while being able to peek into individual services. We aren't really looking at code output. We're looking for system output. Once again, a common taxonomy is critical with metrics. Structuring your keys to be consistent and descriptive will help explain what the ultimate dashboards are saying. Having common keys with metrics and logs is even a better strategy. As with logging, much has been done already and there are standard metrics libraries available in almost every language…