Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elug SP 2016 - Measuring your Elixir Application

Renan Ranelli
April 18, 2016
210

Elug SP 2016 - Measuring your Elixir Application

In this talk I show how you can use Exometer, InfluxDB and Grafana to collect & observer application metrics easily and extensibly.

Renan Ranelli

April 18, 2016
Tweet

Transcript

  1. AGENDA • Why should I care about metrics? • General

    principles when collecting metrics • How we measure our things @ Xerpa • Demo demo demo
  2. DISCLAIMER • The main inspiration for this talk is Coda

    Hale's “Metrics Metrics” talk: • https://www.youtube.com/watch?v=czes-oa0yik
  3. WHY? • We write code. • Code generates business value.

    – When we RUN it is running. – Not when we write it.
  4. WHY? • In order to generate more business value, we

    need to make better decisions about our code.
  5. WHY? • In order to generate more business value, we

    need to make better decisions about our code. • In order to make better decisions about our code (about anything really) we need to measure it.
  6. WHY? • We have a mental model of what our

    code does. • We are often wrong
  7. WHY? • We have a mental model of what our

    code does. • We are often wrong • There is no physical counterpart for the things we work with. We spend too much times inside our heads.
  8. WHY? • If we we're so wrong in such a

    trivial example, imagine a typical web-app scenario:
  9. WHY? • If we we're so wrong in such a

    trivial example, imagine a typical web-app scenario: – Action routing – Database queries – Template rendering – Session cache
  10. WHY? • If we we're so wrong in such a

    trivial example, imagine a typical web-app scenario: – Action routing (10ms) – Database queries (31ms) – Template rendering (22ms) – Session cache (327ms)
  11. WE DON'T KNOW UNTIL WE SEE OUR CODE FOR WHAT

    IT **ACTUALLY** DOES (SCIENCE!!)
  12. TYPES OF MEASUREMENTS – Counters – Gauges – Histograms –

    Timers (See coda-hales “metrics, metrics” talk!)
  13. • • • SQL-like query language • HTTP interface •

    Continuous Queries • Seamless integration with Grafana • (has an exometer reporter)
  14. • Start `grafana` and `influxdb` with `make start` • Configure

    a new data source for influxdb 0.9x, user: root, pass: root, host: http://localhost:8086 • Profit