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

Log analysis for your Heroku app

Log analysis for your Heroku app

Slides from my Heroku JP meetup talk on April 20th, 2012.

Eric Lindvall

April 20, 2012
Tweet

Other Decks in Technology

Transcript

  1. Use a webhook to collect app metrics from Metriks EXAM

    PLE https://github.com/eric/metriks https://github.com/eric/metriks_log_webhook
  2. Metriks.timer('fib.time').time do fib(15) end Turn Measurements into logs Apr 17

    06:09:01 app app/web.1: metriks: time=1334668140 name=fib.time type=timer count=23348919 one_minute_rate=76.0977078982827 five_minute_rate=68.1730503588775 fifteen_minute_rate=62.5690560606605 mean_rate=39.3749046450413 min=0.0100461 max=121.660915185 mean=0.0643679864834903 stddev=0.051298728482402 median=0.018409955 95th_percentile=0.1440550285 Apr 17 06:09:01 app app/web.2: metriks: time=1334668140 name=fib.time type=timer count=13894859 one_minute_rate=23.9993183538984 five_minute_rate=31.6901486523292 fifteen_minute_rate=35.0794473490055 mean_rate=23.4224094363587 min=0.00994003 max=123.195304423 mean=0.0397875258344949 stddev=0.0213955001420874 median=0.015471635 95th_percentile=0.0905222869999997
  3. Turn Logs into graphs Apr 17 06:09:01 app app/web.1: metriks:

    time=1334668140 name=fib.time type=timer count=23348919 one_minute_rate=76.0977078982827 five_minute_rate=68.1730503588775 fifteen_minute_rate=62.5690560606605 mean_rate=39.3749046450413 min=0.0100461 max=121.660915185 mean=0.0643679864834903 stddev=0.051298728482402 median=0.018409955 95th_percentile=0.1440550285 Apr 17 06:09:01 app app/web.2: metriks: time=1334668140 name=fib.time type=timer count=13894859 one_minute_rate=23.9993183538984 five_minute_rate=31.6901486523292 fifteen_minute_rate=35.0794473490055 mean_rate=23.4224094363587 min=0.00994003 max=123.195304423 mean=0.0397875258344949 stddev=0.0213955001420874 median=0.015471635 95th_percentile=0.0905222869999997
  4. Heroku metriks_log_webhook (sinatra app) Rails app (with metriks gem) Papertrail

    Librato Metrics Papertrail webhook logs to Papertrail How it all fits together
  5. All of the links Get a free account: https://papertrailapp.com/ Talk

    to us: https://papertrailapp.com/chat Send logs from your heroku app: https://papertrailapp.com/help/heroku Ask us questions: https://help.papertrailapp.com/ Webhook documentation: http://help.papertrailapp.com/kb/how-it-works/web-hooks Read the papertrail-services source: https://github.com/papertrail/papertrail-services/ See an example custom webhook: https://github.com/eric/metriks_log_webhook/ Download this presentation: http://speakerdeck.com/u/lindvall/p/log-analysis-for-your-heroku-app