SlideShare a Scribd company logo
Do we need a bigger DevData
culture?
Abstract
In front-end software development it's still rare that data is collected on the client
side besides some analytics data where developers usually don't have access to.
Imagine what you can do when you have front-end log data, you see how many
ajax calls hitting your servers and you finally know whether the single page
application is used like you expected or not. I will briefly talk about projects I was
part of where we used these kind of data to improve our product and surprisingly
reduced AWS costs by changing front-end code.
Who am I?
Simon Dittlmann
Saving the world from
toil since 1998
Developer/Ops,
technology nerd
@SinnerSchrader
#IoT, #docker, #js, #frontend,
#infrastructure, #kubernetes
Contact
SimonDittlmann
github.com/Pindar
dittlmann.com
DevData
Collaboration between Dev, Ops and Data
(Science) to collect useful data to improve your
software continuously.
DevData: Why and How?
Everything fails all the time. Quality assurance testing is not enough. Let’s
formalize our developer assumptions, monitor them with data and improve.
Tools: so many. Google Analytics, Elastic-Stack, Datadog, Loggly etc.
Use cases
A. Logs: Client Side Exception tracking
B. Metrics: API performance, Call-Count, Page Performance
C. Application tracking: Find the important to prioritize
Logs: Client Side Exception tracking
Logs: Client Side Exception tracking
Assumption: if there is no JS error in my developer console there aren’t any at all.
So often wrong. For example private browsing is totally different implemented in
various browser.
How to log client exceptions the easiest way without integrating yet another tool
and without hitting my own infrastructure? Use e.g., Google Analytics Exception
tracking.
Logs: Client Side Exception tracking with Google Analytics
window.onerror = function (msg, url, lineNo, columnNo, error) {
ga('send', 'exception', {
'exDescription' : [
'Message: ' + msg,
'URL: ' + url,
'Line: ' + lineNo,
'Column: ' + columnNo,
'Error object: ' + JSON.stringify(error)
].join(' - ')
});
};
Logs: Client Side Exception tracking with Google Analytics
Metrics: API performance, Call-Count, Page
Performance
Metrics: API performance, Call-Count, Page Performance
● Monitor how long an API call takes both on the server side and on the client
side
● Monitor the amount of calls throughout a day
● Program with edge cases in mind
Monitor Server Logs
● Check for latency, response time etc.
● Monitor which endpoints are requested the
most.
● Do load tests from time to time, e.g. with
$> ab -n 100 -c 10 -C 
$cookie_string $domain
● Take advantage of state of the art tooling:
○ Elastic Stack (aka ELK): Kibana,
ElasticSearch, logstash
○ GCloud Stackdriver and BigQuery
○ AWS Cloudwatch logs
○ Software as a Service Solutions like loggly,
papertrail…
User Timings: Tracking an API call
var t0 = performance.now();
ga('send', 'timing', 'api1calls', 'start', Math.round(t0));
fetch('https://www.example.com/testApi1')
.then(function(response) { return response.json(); })
.then(function(data) {
var t1 = performance.now();
var timeItTook = t1 - t0;
console.log(timeItTook, JSON.stringify(data));
// Sends the timing to Google Analytics.
ga('send', 'timing', 'api1calls', 'load', Math.round(timeItTook));
return;
});
User Timings: Tracking an API call
Polling data might be dangerous during deployments
Do not accumulate ajax calls
var pause = false;
setInterval(() => { // the interval is usually shorter than the http timeout…
if (pause) return;
pause = true;
fetch('https://example.com/testApi').then((response) => { return response.json(); })
.then((data) => {
console.log('do something');
pause = false;
}).catch((error) => {
console.log('There has been a problem with your fetch operation: ' + error.message);
pause = false;
});
}, 5000);
Disable polling when page is not visible
// This may save you money in an autoscaling environment
// functionality uses vendor prefixes, see documentation for details.
document.addEventListener(visibilityChange, handleVisibilityChange, false);
function handleVisibilityChange() {
if (document[hidden]) {
clearInterval(timerId);
} else {
timerId = startPolling();
}
}
// https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
Application tracking: Find the important to
prioritize
Optimize the important
● Use analytics data to know what to optimize
● Collect the right data: to support that use html data-* attributes
● Rank your pages based on the value of the page
● Fix JS errors immediately
What else… some ideas.
● using conventional commit messages to determine hotspots in the code base:
e.g. many fixes in one file makes it to a hotspot
● one can use this hotspot information to automatically make code reviews
obligatory for risky changes
● … there is more to come
Questions? Answers!
Image Sources and Links
https://flic.kr/p/spw5mU
http://devopsreactions.tumblr.com/post/147637425073/looking-for-a-bug-in-an-unknown-project
http://devopsreactions.tumblr.com/post/147386843655/high-traffic-hits-the-operations-team
http://www.iacquire.com/blog/speed-matters-improve-usability-with-google-analytics-site-speed-reports

More Related Content

PDF
PredictionIO - Building Applications That Predict User Behavior Through Big D...
PPT
Ajax
PPT
mukesh
PPTX
ConFoo - Exploring .NET’s memory management – a trip down memory lane
PDF
PredictionIO - Scalable Machine Learning Architecture
PDF
[Meetup] a successful migration from elastic search to clickhouse
PPTX
Ajax Technology
PPT
2310 b 11
PredictionIO - Building Applications That Predict User Behavior Through Big D...
Ajax
mukesh
ConFoo - Exploring .NET’s memory management – a trip down memory lane
PredictionIO - Scalable Machine Learning Architecture
[Meetup] a successful migration from elastic search to clickhouse
Ajax Technology
2310 b 11

What's hot (20)

PPTX
Gatling
PPTX
Ajax PPT
DOCX
Ajux calender extender
PPTX
Architecture in Ajax Applications
PDF
Protecting against injections at scale
PPTX
StasD & Graphite - Measure anything, Measure Everything
PDF
Effective monitoring with statsd - Alexis lê-quôc
PDF
Client Side Measurement & Performance With Rails
PPTX
Ajax and ASP.NET AJAX
PPTX
Html server sent events
PPT
Ajax Ppt 1
PDF
The Serverless First Mindset - Keynote
PDF
Rapid Api Prototyping
PPTX
What is Ajax technology?
PDF
Beyond HTML: Tools for Building Web 2.0 Apps
PDF
Leveraging APIs from SharePoint Framework solutions
PDF
SPUnite17 Getting up to Speed with React
PDF
Wicket Live on Stage
PPTX
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Gatling
Ajax PPT
Ajux calender extender
Architecture in Ajax Applications
Protecting against injections at scale
StasD & Graphite - Measure anything, Measure Everything
Effective monitoring with statsd - Alexis lê-quôc
Client Side Measurement & Performance With Rails
Ajax and ASP.NET AJAX
Html server sent events
Ajax Ppt 1
The Serverless First Mindset - Keynote
Rapid Api Prototyping
What is Ajax technology?
Beyond HTML: Tools for Building Web 2.0 Apps
Leveraging APIs from SharePoint Framework solutions
SPUnite17 Getting up to Speed with React
Wicket Live on Stage
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Ad

Viewers also liked (20)

PDF
Automated Infrastructure Security: Monitoring using FOSS
PDF
Platform - Technical architecture
PDF
Yirgacheffe Chelelelktu Washed Coffee 2015
PDF
Linux Malware Analysis
PPT
Jake Fox Pd. 5
PDF
Bridging the Gap: Connecting AWS and Kafka
PDF
Apostila De Dispositivos EléTricos
PPTX
Hunting powerpoint
PDF
Chicago AWS user group meetup - May 2014 at Cohesive
PPTX
Apache Ambari: Managing Hadoop and YARN
PPTX
NSM (Network Security Monitoring) - Tecland Chapeco
PDF
Internationale clusters in vergelijkend perpsectief
PPTX
Reproducible Science with Python
DOC
Gaurav dev ops (AWS, Linux, Automation-ansible, jenkins:CI and CD:Ansible)
PDF
Microservices Tracing With Spring Cloud and Zipkin @Szczecin JUG
PDF
The Lost Tales of Platform Design (February 2017)
PPT
PDF
Orchestrating Docker in production - TIAD Camp Docker
PPTX
API Management - Practical Enterprise Implementation Experience
PPT
Een Gezond Gebit2
Automated Infrastructure Security: Monitoring using FOSS
Platform - Technical architecture
Yirgacheffe Chelelelktu Washed Coffee 2015
Linux Malware Analysis
Jake Fox Pd. 5
Bridging the Gap: Connecting AWS and Kafka
Apostila De Dispositivos EléTricos
Hunting powerpoint
Chicago AWS user group meetup - May 2014 at Cohesive
Apache Ambari: Managing Hadoop and YARN
NSM (Network Security Monitoring) - Tecland Chapeco
Internationale clusters in vergelijkend perpsectief
Reproducible Science with Python
Gaurav dev ops (AWS, Linux, Automation-ansible, jenkins:CI and CD:Ansible)
Microservices Tracing With Spring Cloud and Zipkin @Szczecin JUG
The Lost Tales of Platform Design (February 2017)
Orchestrating Docker in production - TIAD Camp Docker
API Management - Practical Enterprise Implementation Experience
Een Gezond Gebit2
Ad

Similar to Do we need a bigger dev data culture (20)

PPTX
What is going on - Application diagnostics on Azure - TechDays Finland
PPTX
What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
PPTX
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
PDF
Working with data using Azure Functions.pdf
PPTX
Grails and Ajax
PPTX
Using Modern Browser APIs to Improve the Performance of Your Web Applications
PDF
Scaling Experimentation & Data Capture at Grab
PPTX
Code instrumentation
PDF
Why you should be using structured logs
PPTX
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
PDF
Observability foundations in dynamically evolving architectures
PDF
Monitoring as Software Validation
PPTX
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
PPTX
A miało być tak... bez wycieków
PDF
Large scale data capture and experimentation platform at Grab
KEY
Mobile optimization
PPTX
Introduction to WSO2 Data Analytics Platform
PPTX
Bootstrapping an App for Launch
PDF
Reliably Measuring Responsiveness
PDF
112 portfpres.pdf
What is going on - Application diagnostics on Azure - TechDays Finland
What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
Working with data using Azure Functions.pdf
Grails and Ajax
Using Modern Browser APIs to Improve the Performance of Your Web Applications
Scaling Experimentation & Data Capture at Grab
Code instrumentation
Why you should be using structured logs
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
Observability foundations in dynamically evolving architectures
Monitoring as Software Validation
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
A miało być tak... bez wycieków
Large scale data capture and experimentation platform at Grab
Mobile optimization
Introduction to WSO2 Data Analytics Platform
Bootstrapping an App for Launch
Reliably Measuring Responsiveness
112 portfpres.pdf

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Model Code of Practice - Construction Work - 21102022 .pdf
UNIT 4 Total Quality Management .pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CH1 Production IntroductoryConcepts.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Foundation to blockchain - A guide to Blockchain Tech
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
bas. eng. economics group 4 presentation 1.pptx
Operating System & Kernel Study Guide-1 - converted.pdf

Do we need a bigger dev data culture

  • 1. Do we need a bigger DevData culture?
  • 2. Abstract In front-end software development it's still rare that data is collected on the client side besides some analytics data where developers usually don't have access to. Imagine what you can do when you have front-end log data, you see how many ajax calls hitting your servers and you finally know whether the single page application is used like you expected or not. I will briefly talk about projects I was part of where we used these kind of data to improve our product and surprisingly reduced AWS costs by changing front-end code.
  • 3. Who am I? Simon Dittlmann Saving the world from toil since 1998 Developer/Ops, technology nerd @SinnerSchrader #IoT, #docker, #js, #frontend, #infrastructure, #kubernetes Contact SimonDittlmann github.com/Pindar dittlmann.com
  • 4. DevData Collaboration between Dev, Ops and Data (Science) to collect useful data to improve your software continuously.
  • 5. DevData: Why and How? Everything fails all the time. Quality assurance testing is not enough. Let’s formalize our developer assumptions, monitor them with data and improve. Tools: so many. Google Analytics, Elastic-Stack, Datadog, Loggly etc.
  • 6. Use cases A. Logs: Client Side Exception tracking B. Metrics: API performance, Call-Count, Page Performance C. Application tracking: Find the important to prioritize
  • 7. Logs: Client Side Exception tracking
  • 8. Logs: Client Side Exception tracking Assumption: if there is no JS error in my developer console there aren’t any at all. So often wrong. For example private browsing is totally different implemented in various browser. How to log client exceptions the easiest way without integrating yet another tool and without hitting my own infrastructure? Use e.g., Google Analytics Exception tracking.
  • 9. Logs: Client Side Exception tracking with Google Analytics window.onerror = function (msg, url, lineNo, columnNo, error) { ga('send', 'exception', { 'exDescription' : [ 'Message: ' + msg, 'URL: ' + url, 'Line: ' + lineNo, 'Column: ' + columnNo, 'Error object: ' + JSON.stringify(error) ].join(' - ') }); };
  • 10. Logs: Client Side Exception tracking with Google Analytics
  • 11. Metrics: API performance, Call-Count, Page Performance
  • 12. Metrics: API performance, Call-Count, Page Performance ● Monitor how long an API call takes both on the server side and on the client side ● Monitor the amount of calls throughout a day ● Program with edge cases in mind
  • 13. Monitor Server Logs ● Check for latency, response time etc. ● Monitor which endpoints are requested the most. ● Do load tests from time to time, e.g. with $> ab -n 100 -c 10 -C $cookie_string $domain ● Take advantage of state of the art tooling: ○ Elastic Stack (aka ELK): Kibana, ElasticSearch, logstash ○ GCloud Stackdriver and BigQuery ○ AWS Cloudwatch logs ○ Software as a Service Solutions like loggly, papertrail…
  • 14. User Timings: Tracking an API call var t0 = performance.now(); ga('send', 'timing', 'api1calls', 'start', Math.round(t0)); fetch('https://www.example.com/testApi1') .then(function(response) { return response.json(); }) .then(function(data) { var t1 = performance.now(); var timeItTook = t1 - t0; console.log(timeItTook, JSON.stringify(data)); // Sends the timing to Google Analytics. ga('send', 'timing', 'api1calls', 'load', Math.round(timeItTook)); return; });
  • 15. User Timings: Tracking an API call
  • 16. Polling data might be dangerous during deployments
  • 17. Do not accumulate ajax calls var pause = false; setInterval(() => { // the interval is usually shorter than the http timeout… if (pause) return; pause = true; fetch('https://example.com/testApi').then((response) => { return response.json(); }) .then((data) => { console.log('do something'); pause = false; }).catch((error) => { console.log('There has been a problem with your fetch operation: ' + error.message); pause = false; }); }, 5000);
  • 18. Disable polling when page is not visible // This may save you money in an autoscaling environment // functionality uses vendor prefixes, see documentation for details. document.addEventListener(visibilityChange, handleVisibilityChange, false); function handleVisibilityChange() { if (document[hidden]) { clearInterval(timerId); } else { timerId = startPolling(); } } // https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
  • 19. Application tracking: Find the important to prioritize
  • 20. Optimize the important ● Use analytics data to know what to optimize ● Collect the right data: to support that use html data-* attributes ● Rank your pages based on the value of the page ● Fix JS errors immediately
  • 21. What else… some ideas. ● using conventional commit messages to determine hotspots in the code base: e.g. many fixes in one file makes it to a hotspot ● one can use this hotspot information to automatically make code reviews obligatory for risky changes ● … there is more to come
  • 23. Image Sources and Links https://flic.kr/p/spw5mU http://devopsreactions.tumblr.com/post/147637425073/looking-for-a-bug-in-an-unknown-project http://devopsreactions.tumblr.com/post/147386843655/high-traffic-hits-the-operations-team http://www.iacquire.com/blog/speed-matters-improve-usability-with-google-analytics-site-speed-reports