6. To make informed Business
decisions we need to know
the reality of our software
Why?
Terça-feira, 29 de Janeiro de 13
7. How many errors are our
users seeing?
Why?
Terça-feira, 29 de Janeiro de 13
8. Is our App fast enough?
Why?
Terça-feira, 29 de Janeiro de 13
9. Were our assumptions about
performance/usage patterns
proven correct?
Why?
Terça-feira, 29 de Janeiro de 13
10. The Metrics
library
Terça-feira, 29 de Janeiro de 13
11. Metrics is a Java library which gives you unparalleled
insight into what your code does in production.
Developed by Yammer to instrument their JVM-based backend services,
Metrics provides a powerful toolkit of ways to measure the behavior of
critical components in your production environment.
source: http://metrics.codahale.com/
The metrics library
Terça-feira, 29 de Janeiro de 13
13. • Gauges
• Counters
• Histograms
• Meters
• Timers
Types of Metrics
Terça-feira, 29 de Janeiro de 13
14. Structure of
metrics
Terça-feira, 29 de Janeiro de 13
15. Group Top level grouping (“package name”)
Type Second level grouping (“class name”)
Name the metric name (e.g.,“error-count”)
Scope optional
Structure of metrics
Terça-feira, 29 de Janeiro de 13
20. “If it could affect business value, measure it”
Coda Hale - metrics’ author
At yammer they can have up to 40/50 metrics per service
What to Measure?
Terça-feira, 29 de Janeiro de 13
21. REST requests
Timer
What to Measure?
Terça-feira, 29 de Janeiro de 13
23. Calls to external services/processes
Timer
What to Measure?
Terça-feira, 29 de Janeiro de 13
24. Dimensions of requests/responses
Histogram
Examples:
•Search “page” size
•Depth of search requests
•Number of search terms used
What to Measure?
Terça-feira, 29 de Janeiro de 13
25. ERRORS!
Counter / Meter
What to Measure?
Terça-feira, 29 de Janeiro de 13
26. The CoB
experience
Terça-feira, 29 de Janeiro de 13
34. The Metrics Homepage
http://metrics.codahale.com/
Metrics, Metrics, Everywhere - Coda Hale
http://www.youtube.com/watch?v=czes-oa0yik
Graphite
http://graphite.wikidot.com/
References
Terça-feira, 29 de Janeiro de 13
35. Thank you!
@jnelas
joao.nelas@gmail.com
Terça-feira, 29 de Janeiro de 13