SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Home 
Brewing 
R.U.M 
Image source: http://en.wikipedia.org/wiki/Samuel_Adams_%28beer%29#mediaviewer/File:Samadams.jpg
Making 
developers 
happy since eternity 
Image source: http://en.wikipedia.org/wiki/List_of_rum_producers#mediaviewer/File:Rum_display_in_liquor_store.jpg
Real 
User 
Monitoring 
What is 
Image source: https://www.flickr.com/photos/madmask/421679860/in/gallery-zrav-72157623823227993/
Real User Monitoring 
It is a technology for collecting performance 
metrics directly from the browser of an end 
user and sending it to a collection point for 
analysis.
Image source: http://blog-assets.newrelic.com/wp-content/uploads/Sam-image-1.png
Real 
User 
Monitoring 
Why 
Image source: https://www.flickr.com/photos/tonythemisfit/3293309513
There’s 
Money 
in the metrics 
Image source: https://www.flickr.com/photos/epsos/8463683689
Expectations 
Image source: https://www.flickr.com/photos/frosch50/13026387874
Performance 
is 
differentiator 
Image source: https://www.flickr.com/photos/johnnieb/2289615538
Real 
User 
Monitoring 
How 
Image source: https://www.flickr.com/photos/pennuja/5386712834
Visualization 
Core Module 
Error Page 
Load 
Ajax 
Call 
Custom 
Analytic Engine 
Back End 
Front End
Page 
Load 
performance 
Image source: https://www.flickr.com/photos/telexa/2436798809
Measuring Page Load Performance 
1. Request (Link clicked) 
2. Request reaches server 
3. Server finishes execution 
4. Browser Receives HTML 
5. HTML processing finished 
6. Page Rendered 
Network Server DOM Processing Page Rendering
Cookies 
Image source: https://www.flickr.com/photos/seriousbri/4020277369
Cookies 
Network = Time between beforeunload event and first byte received. 
DOM Processing 
Page Rendering 
= Time between first byte received & DOMContentLoaded event. 
= Time between DOMContentLoaded event & load event.
Performance 
timing Api 
Image source: https://www.flickr.com/photos/eflon/5079163335
window.performance.timing 
redirect 
App 
Cache 
Prompt 
for 
unload 
DNS TCP Request Response Processing onLoad 
unload
AJAX 
Call 
performance 
Image source: https://www.flickr.com/photos/respres/2544979655
AJAX call performance 
var xmlhttp = new XMLHttpRequest(); 
xmlhttp.open("GET","remoteResource.txt",true); 
xmlhttp.send();
Measuring AJAX Call Performance 
0 1 2 3 4 
Unsent Opened Headers 
Received 
Loading Done 
Ready State value 
Time to first byte = Time between when send method is called and 
when first time ready state value is 3 (Loading) 
Downloading Time = Time between first time ready state value is 3 
(Loading) and when it is 4 (Done)
Monkey Patching 
Image source: https://www.flickr.com/photos/epsos/8463683689
Monkey Patching XMLHttpRequest 
_XMLHttpRequest = window.XMLHttpRequest; 
// Monkey Patched XMLHttpRequest Version 
window.XMLHttpRequest = function() { 
var req = new _XMLHttpRequest; 
// Monkey Patched version of open() and send() methods 
return req; 
};
Monkey Patching XMLHttpRequest 
_open = req.open; 
req.open = function(type, url, async) { 
req.addEventListener('readystatechange', function() { 
// Log timing for every state change 
}, false); 
req.addEventListener('loadend', function(event) { 
// Send all timing data to remote server 
}, false); 
return _open.apply(req, arguments); 
};
Monkey Patching XMLHttpRequest 
_send = req.send; 
req.send = function() { 
// Log timing when send is called 
return _send.apply(req, arguments); 
}
Performance 
getEntriesByType 
Api 
Image source: https://www.flickr.com/photos/ericflexyourhead/14083106147
HTML5 Performance Api 
window.performance.getEntriesByType('resource') 
Redirect 
App 
Cache 
DNS TCP Request Response
Error 
handling 
Image source: http://en.wikipedia.org/wiki/Coccinellidae#mediaviewer/File:Coccinella_magnifica01.jpg
window.onError 
Error Message 
Line Number 
File Name 
Stack trace 
Char number 
Work for cross origin scripts
try catch block 
Error Message 
Line Number 
File Name 
Stack trace 
Char number 
Work for cross origin scripts
Wrapper for Reporting Error 
function wrapper(fn) { 
return function() { 
try{ 
return fn.apply(this,arguments); 
}catch(e) { 
repportError(e); 
throw e; 
} 
}; 
}
Wrapper for Reporting Error 
var wrappedFunction = wrapper(function(){ 
// function definition 
});
Challenges 
in error tracking 
Image source: https://www.flickr.com/photos/chrismatos/6784152671
Challenges in Error Tracking 
● Different browsers provide different stack trace information. 
● Steps to reproduce Error. 
● Need to manually wrap each function.
Challenges in Error Tracking 
Different browser provides different stack trace information. 
Tracekit.js / Stacktrace.js are well tested libraries which abstract 
this.
Challenges in Error Tracking 
Steps to reproduce error. 
Capture last X events in array like Input or click event and report 
them back along with error information.
Challenges in Error Tracking 
document.querySelector('input').addEventListener('change', 
function(e){ 
// Adding it to the event array 
});
Challenges in Error Tracking 
Need to manually wrap each function. 
Using instrumentation at build time or script serving time it can be 
automated.
Instrumenting 
JavaScript 
Image source: http://combathelo.blogspot.in/2010/05/multi-page-displays-wep-gun-submode.html
JavaScript Engine Building Blocks 
Parser 
Runtime 
Syntax Tree 
Source Code VM
Abstract Syntax Tree 
Number 
var a = 1 ; 
Equal Sign 
Identifier 
Keyword 
Variable 
Declaration 
Identifier 
Literal 
Constant
Instrumentation 
Esprima 
(Parser) 
Instrumentor 
Escodegen 
(Generator) 
JavaScript 
code 
Transformed 
JavaScript AST 
Transformed 
code 
JavaScript 
AST
Instrumentation 
Welcome Falafel library
Analysis 
& 
Visualization 
Image source: http://monster-solutions.net/2014/07/03/elk-stack-logging-solutions-now-available/
Analysis & Visualization 
● Elastic Search 
● Log Stash 
● Kibana
Other 
use cases 
of R.U.M 
Image source: http://monster-solutions.net/2014/07/03/elk-stack-logging-solutions-now-available/
Image source: https://www.flickr.com/photos/opensourceway/5556249000
Feedback: http://bit.ly/jsfoo-rum-feedback 
Slides: http://bit.ly/jsfoo-rum-slides 
@ankit0rastogi 
Image source: https://www.flickr.com/photos/theilluminated/5386099858

Weitere ähnliche Inhalte

Was ist angesagt?

CompletableFuture
CompletableFutureCompletableFuture
CompletableFuture
koji lin
 

Was ist angesagt? (8)

Simple acl with laravel
Simple acl with laravelSimple acl with laravel
Simple acl with laravel
 
How to Win on the Apple Watch
How to Win on the Apple WatchHow to Win on the Apple Watch
How to Win on the Apple Watch
 
CompletableFuture
CompletableFutureCompletableFuture
CompletableFuture
 
Monads in Swift
Monads in SwiftMonads in Swift
Monads in Swift
 
Les nouveautés de Rails 3
Les nouveautés de Rails 3Les nouveautés de Rails 3
Les nouveautés de Rails 3
 
Practical Protocols with Associated Types
Practical Protocols with Associated TypesPractical Protocols with Associated Types
Practical Protocols with Associated Types
 
Angular server-side communication
Angular server-side communicationAngular server-side communication
Angular server-side communication
 
Avoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.jsAvoiding Callback Hell with Async.js
Avoiding Callback Hell with Async.js
 

Andere mochten auch

Incident Command: The far side of the edge
Incident Command: The far side of the edgeIncident Command: The far side of the edge
Incident Command: The far side of the edge
Fastly
 
Cedar Ridge Weekly Report
Cedar Ridge Weekly ReportCedar Ridge Weekly Report
Cedar Ridge Weekly Report
clstutts
 
Mindmappen
MindmappenMindmappen
Mindmappen
yperlaan
 

Andere mochten auch (20)

IBM Bluemix OpenWhisk: IBM Seminar 2016, Tokyo, Japan: The Future of Cloud Pr...
IBM Bluemix OpenWhisk: IBM Seminar 2016, Tokyo, Japan: The Future of Cloud Pr...IBM Bluemix OpenWhisk: IBM Seminar 2016, Tokyo, Japan: The Future of Cloud Pr...
IBM Bluemix OpenWhisk: IBM Seminar 2016, Tokyo, Japan: The Future of Cloud Pr...
 
Aws security with HIDS using Ossec
Aws security with HIDS using OssecAws security with HIDS using Ossec
Aws security with HIDS using Ossec
 
Yodlee Customer Presentation
Yodlee Customer PresentationYodlee Customer Presentation
Yodlee Customer Presentation
 
John 15:12 Ministries
John 15:12 MinistriesJohn 15:12 Ministries
John 15:12 Ministries
 
Micropipetten
MicropipettenMicropipetten
Micropipetten
 
IT Infrastructure Monitoring Strategies in Healthcare
IT Infrastructure Monitoring Strategies in HealthcareIT Infrastructure Monitoring Strategies in Healthcare
IT Infrastructure Monitoring Strategies in Healthcare
 
Finland powerpoint
Finland powerpointFinland powerpoint
Finland powerpoint
 
Service Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache MesosService Orchestrierung mit Apache Mesos
Service Orchestrierung mit Apache Mesos
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
 
Incident Command: The far side of the edge
Incident Command: The far side of the edgeIncident Command: The far side of the edge
Incident Command: The far side of the edge
 
An Introduction to event sourcing and CQRS
An Introduction to event sourcing and CQRSAn Introduction to event sourcing and CQRS
An Introduction to event sourcing and CQRS
 
Cedar Ridge Weekly Report
Cedar Ridge Weekly ReportCedar Ridge Weekly Report
Cedar Ridge Weekly Report
 
Tic’s y enfermería
Tic’s y enfermeríaTic’s y enfermería
Tic’s y enfermería
 
WTF is Sensu and Monitoring
WTF is Sensu and MonitoringWTF is Sensu and Monitoring
WTF is Sensu and Monitoring
 
Mindmappen
MindmappenMindmappen
Mindmappen
 
Lost in Translation - Blackhat Brazil 2014
Lost in Translation - Blackhat Brazil 2014Lost in Translation - Blackhat Brazil 2014
Lost in Translation - Blackhat Brazil 2014
 
Mohamed Ahmed Abdelkhalek
Mohamed Ahmed AbdelkhalekMohamed Ahmed Abdelkhalek
Mohamed Ahmed Abdelkhalek
 
Open Source Approach to Design and Deployment of Microservices-based VNF
Open Source Approach to Design and Deployment of Microservices-based VNFOpen Source Approach to Design and Deployment of Microservices-based VNF
Open Source Approach to Design and Deployment of Microservices-based VNF
 
concepto de colección local
concepto de colección localconcepto de colección local
concepto de colección local
 
Joomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla PerformanceJoomladagen 2015 Joomla Performance
Joomladagen 2015 Joomla Performance
 

Ähnlich wie Home Brewing R.U.M - Analyzing application performance with real user monitoring

Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
seleniumconf
 
PHP Continuous Data Processing
PHP Continuous Data ProcessingPHP Continuous Data Processing
PHP Continuous Data Processing
Michael Peacock
 
Paulo morgado what's new in c# 5.0
Paulo morgado   what's new in c# 5.0Paulo morgado   what's new in c# 5.0
Paulo morgado what's new in c# 5.0
iseltech
 

Ähnlich wie Home Brewing R.U.M - Analyzing application performance with real user monitoring (20)

Pushing the Web: Interesting things to Know
Pushing the Web: Interesting things to KnowPushing the Web: Interesting things to Know
Pushing the Web: Interesting things to Know
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
 
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer DriverBuilding a Driver: Lessons Learned From Developing the Internet Explorer Driver
Building a Driver: Lessons Learned From Developing the Internet Explorer Driver
 
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry PiGrâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
 
Power ai image-pipeline
Power ai image-pipelinePower ai image-pipeline
Power ai image-pipeline
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
 
JavaScript Lessons 2023
JavaScript Lessons 2023JavaScript Lessons 2023
JavaScript Lessons 2023
 
Ajax
AjaxAjax
Ajax
 
Developing JSR 286 Portlets
Developing JSR 286 PortletsDeveloping JSR 286 Portlets
Developing JSR 286 Portlets
 
PHP Continuous Data Processing
PHP Continuous Data ProcessingPHP Continuous Data Processing
PHP Continuous Data Processing
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Learn Drupal 8 Render Pipeline
Learn Drupal 8 Render PipelineLearn Drupal 8 Render Pipeline
Learn Drupal 8 Render Pipeline
 
Interoperable Component Patterns
Interoperable Component PatternsInteroperable Component Patterns
Interoperable Component Patterns
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
AJAX Transport Layer
AJAX Transport LayerAJAX Transport Layer
AJAX Transport Layer
 
Paulo morgado what's new in c# 5.0
Paulo morgado   what's new in c# 5.0Paulo morgado   what's new in c# 5.0
Paulo morgado what's new in c# 5.0
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Home Brewing R.U.M - Analyzing application performance with real user monitoring