SlideShare une entreprise Scribd logo
1  sur  47
Logging & Metrics 
Tammo van Lessen Christian Grobmeier 
@taval @grobmeier
log.errorſ"Houston?"ƀ;
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
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
Enough?
Dealing with the Stream Of 
Logs 
Flume, Kafka, Logstash, Graylog2, Fluentd
Searching logs 
Graylog2, ElasticSearch
Having an overview
A Logstash Cluster 
From the Logstash docs
May I help you? 
FluentD (AL 2.0) 
Graylog 2 (GPL) 
Loggly (commerical)
If you want to know... 
...you need to log.
How much is healthy?
Trace is almost for free. 
Log4j 2 Filters help too.
Default Levels 
Files? Warn only. 
Logstash & Co? Info. 
Magic bugs + advanced setup? Debug, or even trace.
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
Logging is cool. 
Can I use it to get a health status of my 
systems?
You can! 
But you shouldn't!
Metrics 
Business Metrics 
Application Metrics 
System Metrics
Gauges 
An instrument that measures a value.
Counters 
A counter is a simple incrementing and decrementing integer.
Histograms 
A Histogram measures the distribution of values.
Meters 
A meter measures the rate at which a set of events occur.
Timers
Dashboards
Graphite
Cubism.js 
Mirror Offset 1 − + 
Credits: Michael Bostock
Comparisons 
var cube = context.cubeſ"http://..."ƀ, 
primary = cube.metricſ"sumſrequestƀ"ƀ, 
secondary = 
primary.shiftſ-ɮ * ɩɫ * ɭ0 * ɭ0 * ɨ000ƀ;
Graphene 
...
Dashing 
...
Best practices 
Measure everything! 
Counters ./. Meters 
Metrics are cheap, but not for free. 
Retention Policies
Prevent the apocalypse! 
Logging shows events. 
Metrics shows state.
Thank you! 
We use Twitter! 
@taval, @innoq & @grobmeier
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

Contenu connexe

En vedette

Business Process Management with BPMN & BPEL
Business Process Management  with BPMN & BPELBusiness Process Management  with BPMN & BPEL
Business Process Management with BPMN & BPEL
Tammo van Lessen
 
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPELOracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Guido Schmutz
 

En vedette (20)

Business Process Execution Language (BPEL)
Business Process Execution Language (BPEL)Business Process Execution Language (BPEL)
Business Process Execution Language (BPEL)
 
Introduction to business process execution language
Introduction to business process execution languageIntroduction to business process execution language
Introduction to business process execution language
 
Learn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutesLearn Dashing Widget in 90 minutes
Learn Dashing Widget in 90 minutes
 
Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0Web Services Orchestration with BPEL 2.0
Web Services Orchestration with BPEL 2.0
 
Formalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL lightFormalizing Message Exchange Patterns using BPEL light
Formalizing Message Exchange Patterns using BPEL light
 
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
Prometheus: A Next Generation Monitoring System (FOSDEM 2016)
 
Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)Systems Monitoring with Prometheus (Devops Ireland April 2015)
Systems Monitoring with Prometheus (Devops Ireland April 2015)
 
Business Process Management with BPMN & BPEL
Business Process Management  with BPMN & BPELBusiness Process Management  with BPMN & BPEL
Business Process Management with BPMN & BPEL
 
Data Platform at Twitter: Enabling Real-time & Batch Analytics at Scale
Data Platform at Twitter: Enabling Real-time & Batch Analytics at ScaleData Platform at Twitter: Enabling Real-time & Batch Analytics at Scale
Data Platform at Twitter: Enabling Real-time & Batch Analytics at Scale
 
OpenESB et BPEL
OpenESB et BPELOpenESB et BPEL
OpenESB et BPEL
 
Elasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveElasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep dive
 
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPELOracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
Oracle Service Bus vs. Oracle Enterprise Service Bus vs. BPEL
 
Prometheus Overview
Prometheus OverviewPrometheus Overview
Prometheus Overview
 
Introduction and Advanced Concepts of BPEL
Introduction and Advanced Concepts of BPELIntroduction and Advanced Concepts of BPEL
Introduction and Advanced Concepts of BPEL
 
Fall in Love with Graphs and Metrics using Grafana
Fall in Love with Graphs and Metrics using GrafanaFall in Love with Graphs and Metrics using Grafana
Fall in Love with Graphs and Metrics using Grafana
 
Fluentd and Kafka
Fluentd and KafkaFluentd and Kafka
Fluentd and Kafka
 
Volta: Logging, Metrics, and Monitoring as a Service
Volta: Logging, Metrics, and Monitoring as a ServiceVolta: Logging, Metrics, and Monitoring as a Service
Volta: Logging, Metrics, and Monitoring as a Service
 
BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?
BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?
BPMN, BPEL, ESB or maybe Java? What should I use to implement my project?
 
Grafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and ChallengesGrafana and MySQL - Benefits and Challenges
Grafana and MySQL - Benefits and Challenges
 
Demystifying Data Engineering
Demystifying Data EngineeringDemystifying Data Engineering
Demystifying Data Engineering
 

Plus de Tammo van Lessen

Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-OrchesterWeb Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Tammo van Lessen
 

Plus de Tammo van Lessen (9)

Behavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMNBehavior-driven Business Process Development with BPMN
Behavior-driven Business Process Development with BPMN
 
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kannVorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
Vorsicht Schuldenfalle - Was die IT aus der Finanzwelt lernen kann
 
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-OrchesterWeb Service Composition mit WS-BPEL und dem Open-Source-Orchester
Web Service Composition mit WS-BPEL und dem Open-Source-Orchester
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
 
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
Virtualizing Services and Resources with ProBus: The WS-Policy-Aware Service...
 
SOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODESOA-based Business Integration with Eclipse BPEL and Apache ODE
SOA-based Business Integration with Eclipse BPEL and Apache ODE
 
Facilitating Rich Data Manipulation in BPEL using E4X
Facilitating Rich Data Manipulation in BPEL using E4XFacilitating Rich Data Manipulation in BPEL using E4X
Facilitating Rich Data Manipulation in BPEL using E4X
 
BPM meets Semantic Web
BPM meets Semantic WebBPM meets Semantic Web
BPM meets Semantic Web
 
An Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business ProcessesAn Execution Engine For Semantic Business Processes
An Execution Engine For Semantic Business Processes
 

Dernier

Dernier (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Logging & Metrics

  • 1. Logging & Metrics Tammo van Lessen Christian Grobmeier @taval @grobmeier
  • 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.
  • 5.
  • 6.
  • 7. 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
  • 9. Dealing with the Stream Of Logs Flume, Kafka, Logstash, Graylog2, Fluentd
  • 10. Searching logs Graylog2, ElasticSearch
  • 12.
  • 13. A Logstash Cluster From the Logstash docs
  • 14. May I help you? FluentD (AL 2.0) Graylog 2 (GPL) Loggly (commerical)
  • 15. If you want to know... ...you need to log.
  • 16. How much is healthy?
  • 17. Trace is almost for free. Log4j 2 Filters help too.
  • 18. Default Levels Files? Warn only. Logstash & Co? Info. Magic bugs + advanced setup? Debug, or even trace.
  • 19. 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
  • 20. Logging is cool. Can I use it to get a health status of my systems?
  • 21. You can! But you shouldn't!
  • 22. Metrics Business Metrics Application Metrics System Metrics
  • 23. Gauges An instrument that measures a value.
  • 24. Counters A counter is a simple incrementing and decrementing integer.
  • 25. Histograms A Histogram measures the distribution of values.
  • 26. Meters A meter measures the rate at which a set of events occur.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 39. Cubism.js Mirror Offset 1 − + Credits: Michael Bostock
  • 40.
  • 41. Comparisons var cube = context.cubeſ"http://..."ƀ, primary = cube.metricſ"sumſrequestƀ"ƀ, secondary = primary.shiftſ-ɮ * ɩɫ * ɭ0 * ɭ0 * ɨ000ƀ;
  • 44. Best practices Measure everything! Counters ./. Meters Metrics are cheap, but not for free. Retention Policies
  • 45. Prevent the apocalypse! Logging shows events. Metrics shows state.
  • 46. Thank you! We use Twitter! @taval, @innoq & @grobmeier
  • 47. 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