Logging & Metrics

2,759 views
2,477 views

Published on

Talk held with @grobmeier at W-JAX-2013

https://www.innoq.com/de/talks/2013/11/logging-und-metriken-naher-dran-statt-nur-dabei/

Published in: Technology, Business
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,759
On SlideShare
0
From Embeds
0
Number of Embeds
73
Actions
Shares
0
Downloads
0
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Logging & Metrics

  1. 1. Logging & Metrics Tammo van Lessen Christian Grobmeier @taval @grobmeier
  2. 2. log.errorſ"Houston?"ƀ;
  3. 3. NrɬwLɩsGnT FUCkQJɫYcJ jUQwjIaagt uVimjWTocH xɪUNWɰXZɨB dtNpSSkɬfw ADjɬɭfqlnt IOHlɫHACmU mɫJɨiɪgɫɬp wmɬommkSvh ttjWddKɰɩL VZdCOlɮSjg epqMlTntGL toɯBo00WMi NɪTzEjFɩZɪ rsɰwɪeɨZLɩ ɬXɭumEbaiu ɭCLɯHBEKɩX PihltWebCI VtuɮxhTBdf ɯHɪmhqY0ug ɰɨWvNUYCtɯ rMpEVUiwUA lɯSaAnGNto nPcoiO0rhq TYtɫpMrnrt HOUSTON!!! ɭVKJqPAnbO VɰqofvZZfq zɩlɰɮjCNqQ M0IFOjnNyg ɫMBɩbɪqcIH KXkɬypeVTɭ ZIHciɩrLyi DdLiDNuYhɬ CIhpkɯɰxEa pKSNIɫzNtB rQɬCAZSUwc MLYɨERwCɯX yZQTzyOpZb TOOrfLATEv RfLwPsLfpQ ɨcmPmjCXwɭ ɭRXɪrqEqUa UzzEmCafve BNlRGzhDhɯ ɪtNdDfhQLn TSɬKPpmIOR sntɯemAsgZ WxKMɩɭsPbt NkAhɯOFRHK rzɫjPlRɪQg OhoWɰUiOzB RBZcɫNbjCA fgjchgɮKHL pXɰGɪTɫTti
  4. 4. MDC to the rescue? ThreadContext.putſ"loginId", loginƀ; logger.errorſ"Something bad happened!"ƀ; ThreadContext.clearſƀ; + Layout: %-ɬp: %m%n %X{loginId} Could log: ERROR: Something bad happened! @grobmeier
  5. 5. Enough?
  6. 6. Dealing with the Stream Of Logs Flume, Kafka, Logstash, Graylog2, Fluentd
  7. 7. Searching logs Graylog2, ElasticSearch
  8. 8. Having an overview
  9. 9. A Logstash Cluster From the Logstash docs
  10. 10. May I help you? FluentD (AL 2.0) Graylog 2 (GPL) Loggly (commerical)
  11. 11. If you want to know... ...you need to log.
  12. 12. How much is healthy?
  13. 13. Trace is almost for free. Log4j 2 Filters help too.
  14. 14. Default Levels Files? Warn only. Logstash & Co? Info. Magic bugs + advanced setup? Debug, or even trace.
  15. 15. Start with verbs DEBUG adding user @grobmeier on node "baldur" DEBUG removing user @taval on node "mjölnir" DEBUG created entry for @taval on node "baldur" Idea taken from TJ Holowaychuk
  16. 16. Logging is cool. Can I use it to get a health status of my systems?
  17. 17. You can! But you shouldn't!
  18. 18. Metrics Business Metrics Application Metrics System Metrics
  19. 19. Gauges An instrument that measures a value.
  20. 20. Counters A counter is a simple incrementing and decrementing integer.
  21. 21. Histograms A Histogram measures the distribution of values.
  22. 22. Meters A meter measures the rate at which a set of events occur.
  23. 23. Timers
  24. 24. Dashboards
  25. 25. Graphite
  26. 26. Cubism.js Mirror Offset 1 − + Credits: Michael Bostock
  27. 27. Comparisons var cube = context.cubeſ"http://..."ƀ, primary = cube.metricſ"sumſrequestƀ"ƀ, secondary = primary.shiftſ-ɮ * ɩɫ * ɭ0 * ɭ0 * ɨ000ƀ;
  28. 28. Graphene ...
  29. 29. Dashing ...
  30. 30. Best practices Measure everything! Counters ./. Meters Metrics are cheap, but not for free. Retention Policies
  31. 31. Prevent the apocalypse! Logging shows events. Metrics shows state.
  32. 32. Thank you! We use Twitter! @taval, @innoq & @grobmeier
  33. 33. Credits Holzstapel CPU by mbostock Mess by Rev Stan Debt by "Images Money" (Flickr) Pay Here by Marc Falardeau Cockpit by Ronnie Rams Stream by Phil Whitehouse Magnifier by John Lodder (Flickr) Flying Saucer, Cup, and Teapot! by Mr Thinktank Ice berg by Derek Keats Gas Meters by mxmstryo (Flickr) Gauge Stock by Andrew Taylor (Flickr) Counter by Marcin Wichary (Flickr) Histogram of legos by color frequency by Jeff Boulter (Flickr) pomodoro timers by Paul Downey (Flickr) Zombie Apocalypse by pasukaru76

×