metrics - performance monitoring or business value optimization?

Preview:

DESCRIPTION

Presentation done at the Portuguese JUG http://jug.pt/, about the metrics library from Yammer http://metrics.codahale.com/.

Citation preview

or business value optimization?performance monitoring

metrics

Terça-feira, 29 de Janeiro de 13

Me

Terça-feira, 29 de Janeiro de 13

• CTO at Cult of Bits

• 10+ years of professional Java development

MeTerça-feira, 29 de Janeiro de 13

Why?

Terça-feira, 29 de Janeiro de 13

Why?

Ultimately it’s aboutBusiness Value

Terça-feira, 29 de Janeiro de 13

Why?

To make informed Business decisions we need to know the reality of our software

Terça-feira, 29 de Janeiro de 13

Why?

How many errors are our users seeing?

Terça-feira, 29 de Janeiro de 13

Why?

Is our App fast enough?

Terça-feira, 29 de Janeiro de 13

Why?

Were our assumptions about performance/usage patterns

proven correct?

Terça-feira, 29 de Janeiro de 13

The Metrics library

Terça-feira, 29 de Janeiro de 13

The metrics library

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/

Terça-feira, 29 de Janeiro de 13

Types of Metrics

Terça-feira, 29 de Janeiro de 13

• Gauges• Counters• Histograms• Meters• Timers

Types of MetricsTerça-feira, 29 de Janeiro de 13

Structure of metrics

Terça-feira, 29 de Janeiro de 13

Structure of metrics

Group Top level grouping (“package name”)

Type Second level grouping (“class name”)

Name the metric name (e.g.,“error-count”)

Scope optional

Terça-feira, 29 de Janeiro de 13

Outputs

Terça-feira, 29 de Janeiro de 13

• JMX• Console• CSV files• JSON servlet• Graphite• Ganglia

OutputsTerça-feira, 29 de Janeiro de 13

DEMO TIME

Terça-feira, 29 de Janeiro de 13

What to measure?

Terça-feira, 29 de Janeiro de 13

“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?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

REST requests

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

MySQL/couchdb/Solr queries

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Calls to external services/processes

Timer

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

Dimensions of requests/responses

Histogram

Examples:

•Search “page” size

•Depth of search requests

•Number of search terms used

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

ERRORS!

Counter / Meter

What to Measure?At yammer they can have up to 40/50 metrics per service

Terça-feira, 29 de Janeiro de 13

The CoBexperience

Terça-feira, 29 de Janeiro de 13

Our use-case

Terça-feira, 29 de Janeiro de 13

• Lots of applications in different sites

• 1-3 servers• No full-time network access

Our use-caseTerça-feira, 29 de Janeiro de 13

lessons learned

Terça-feira, 29 de Janeiro de 13

lessons learned

Naming metrics can be hard

Terça-feira, 29 de Janeiro de 13

lessons learned

Creating metrics is just the start

Terça-feira, 29 de Janeiro de 13

lessons learned

Having hard data to help decision is pricelless

Terça-feira, 29 de Janeiro de 13

References

Terça-feira, 29 de Janeiro de 13

The Metrics Homepagehttp://metrics.codahale.com/

Metrics, Metrics, Everywhere - Coda Hale http://www.youtube.com/watch?v=czes-oa0yik

Graphitehttp://graphite.wikidot.com/

ReferencesTerça-feira, 29 de Janeiro de 13

Thank you!

@jnelasjoao.nelas@gmail.com

Terça-feira, 29 de Janeiro de 13