Metrics are very useful to understand service usage, volume trends (growth/decline) – leading to improving performance/capacity planning, diversity of user base, etc.
A service mediation layer can initialize and persist metrics and can help efforts to mine that data to generate reports using the data. What specific metrics can be captured? Here are a few attributes:
incoming time, outgoing time (or publication time) , transport (whether service was invoked via HTTP, JMS, or some other transport), requesting host name/queue name etc. Additionally, if a request processing resulted in an error – error details including stack trace can be captured. Finally, service/operation-specific metrics can be captured – if you don’t have demanding reporting requirements, these attributes can be stored as a set of name/value pairs.
In a follow up post, will elaborate on how specific metrics can be captured throughout service processing.