SlideShare a Scribd company logo
Metrics on the front, party
data in the back
Approaches to bringing metrics to the front end
Matt Fellows
@matthewfellows
github.com/mefellows
WARNING:
Intended for mature audiences only. Content may contain
harsh and/or violent outbreaks concerning Adobe Analytics.
Offended viewers are advised to stop using the product
immediately and take the team go-karting with the savings.
Why do we need metrics?
Down the rabbit hole
“Alice: Would you tell me, please, which way I ought to go from here?
The Cheshire Cat: That depends a good deal on where you want to get to.
Alice: I don't much care where.
The Cheshire Cat: Then it doesn't much matter which way you go.
― Lewis Carroll, Alice in Wonderland
If we are to succeed, we ought to know where we are and where we’re
going
The lesson?
Hit Counters - The Analytics Dark Ages
Hit counters tell us basically nothing about how to improve our website:
● We don’t know what we could do to improve the site
● We can’t distinguish between real people and crawlers
● We can’t tell if changing the comic, or the navigation or making
pretty pictures makes any difference at all
We need a way to measure things in more detail to improve our
chances of adding business value
So we evolved….
Analytics 2.0
s.businessUnit = 'ske';
s.country = 'au';
s.platform = 'd';
s.section = 'homepage';
require(['omniture'], function (omniture) {
var queueTrackingOnly = 'false';
if (queueTrackingOnly == 'true' && omniture.store) {
omniture.store({"pageName":"home page","channel":"home","prop4":"home page","prop6":"home","prop11":"b19ee802-ce67-e511-80e9-
6c3be5b017d4","prop12":"loggedin","prop54":"c79529bc-4559-49be-a5b6-8fc8b42c27be","eVar54":"c79529bc-4559-49be-a5b6-8fc8b42c27be"});
}
else {
s.pageName = 'home page';
s.channel = 'home';
s.prop4 = 'home page';
s.prop6 = 'home';
s.prop11 = 'b19ee802-ce67-e511-80e9-6c3be5b017d4';
s.prop12 = 'loggedin';
s.prop54 = 'c79529bc-4559-49be-a5b6-8fc8b42c27be';
var s_code = s.t(); if (s_code) document.write(s_code);
}
});
Analytics 2.0
Instead of sticking hit counters on our websites, we stuck large chunks
of of javascript into our web pages...
And it was good
Analytics 2.0
Told us a hell of a lot about what people did on our websites
(Impressions, Attribution, Funnel Analysis and so on).
But...
1. Designed for business users
2. Lack APIs
3. Cumbersome to implement
4. Real-time (no - they are lying)
5. Data Monoliths (do you own your data and can you query it?)
The Lean Startup
http://theleanstartup.com/principles
Lean Startup
Build, measure, learn and repeat.
This changed the landscape in a number of fundamental ways:
● Develop -> deploy cycle had to shrink
● Rise of DevOps & Continuous Delivery
● Requires better visibility into operational and business metrics
Previous generation tooling insufficient for this purpose.
New Generation Analytics Platforms
Complement traditional analytics tools, and are
1. Designed for technical users
2. API first
3. Easier to implement
4. Near real-time
5. Data ownership
6. Alerts/Notifications
We can now begin ask questions and answer them immediately:
“Did my change to the Widget result in more, less or no change?”
New Generation Analytics Platforms
Commercial
1. keen.io
2. segment.io
3. trak.io
4. KISS Metrics
5. Datadog <- this one is nice!
Open Source:
4. SGG Stack (Statsd, Graphite and Grafana) <- start here
5. TICK Stack (Telegraf, InfluxDB, Chronograf, Kapacitor)
We can take ownership of the metrics we need
Isomorphic Universal Metrics
Metrics on the front and back
Creating, deploying and integrating our own metrics stack is easy.
Implementation
Implementation Architecture
1. React front-end (canonical TODO App) + Redux
2. Metrics Stack
a. Statsd as wire protocol
b. InfluxDB as the time-series database
c. Bucky to broker web <-> InfluxDB
3. All wired together with Docker
Challenge: Sending metrics to statsd (UDP) from Node and direct
from the browser.
Implementation
Bucky to the rescue
Implementation
Setup Bucky...
import bucky from 'bucky';
import { metricsHost, metricsIsEnabled } from 'config';
bucky
.setOptions({
host: metricsHost,
active: metricsIsEnabled
});
import analytics from 'redux-analytics';
const track = ({ type, payload = {} }) => {
const { value = 1 } = payload;
const key = `mymetricnamespace.actions.${type}`;
bucky.count(key, value);
};
const analyticsMiddleware = analytics(track, ({ meta }) =>
meta.metrics);
Create some Redux middleware
Add metadata to Flux Standard Action
const action = {
type: 'MY_ACTION',
meta: {
metrics: {
type: 'my-analytics-event',
payload: {
postfix: 'special', //
value: 3 // default is 1
}
}
}
};
// Will result in the statsd metric ${metricsPrefix}.actions.my-analytics-event.special to be incremented by 3
Manual Instrumentation
import bucky from 'bucky';
class HelloApp extends React.Component {
constructor(props) {
super(props);
bucky.send('helloapp.constructor', 2432.43434); // gauge
this.state = {
filterType: 'all'
};
}
Creating, deploying and integrating our own metrics stack is easy.
Demo
Universal React with metrics
https://github.com/mefellows/react-redux-todo-app/
Matt Fellows
PRESENTED BY:
@matthewfellows
github.com/mefellows
Thank you!
■ Bucky (http://github.hubspot.com/bucky/)
■ Metrics, Metrics Everywhere
(https://dl.dropboxusercontent.com/u/2744222/2011-04-09-
Metrics-Metrics-Everywhere.pdf)
■ Redux Analytics (https://github.com/markdalgleish/redux-
analytics)
■ StatsD (https://github.com/etsy/statsd/)
■ TICK Docker (https://github.com/mefellows/docker-tick)
■ Fun Omniture Memes
■ TODO App: React + Redux + Bucky + TICK Demo
(https://github.com/mefellows/react-redux-todo-app/)
References

More Related Content

Viewers also liked

Parotid Tumor (Indonesian Language)
Parotid Tumor (Indonesian Language)Parotid Tumor (Indonesian Language)
Parotid Tumor (Indonesian Language)
meducationdotnet
 
порядок аттест педработ
порядок аттест педработпорядок аттест педработ
порядок аттест педработ
Murat77
 
о методобъединении
о методобъединениио методобъединении
о методобъединении
Murat77
 

Viewers also liked (19)

HistChine 5.10
HistChine 5.10HistChine 5.10
HistChine 5.10
 
Parotid Tumor (Indonesian Language)
Parotid Tumor (Indonesian Language)Parotid Tumor (Indonesian Language)
Parotid Tumor (Indonesian Language)
 
2016 03 Mieux connaître le marché du MICE
2016 03 Mieux connaître le marché du MICE2016 03 Mieux connaître le marché du MICE
2016 03 Mieux connaître le marché du MICE
 
IDRC - B Signer - v4
IDRC - B Signer - v4IDRC - B Signer - v4
IDRC - B Signer - v4
 
Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...
Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...
Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...
 
The importance of rest
The importance of restThe importance of rest
The importance of rest
 
Enterprise Knowledge and National Park Service KMWorld 2015 Presentation
Enterprise Knowledge and National Park Service KMWorld 2015 PresentationEnterprise Knowledge and National Park Service KMWorld 2015 Presentation
Enterprise Knowledge and National Park Service KMWorld 2015 Presentation
 
Membuat Presentasi Menarik Menggunakan Prezi
Membuat Presentasi Menarik Menggunakan PreziMembuat Presentasi Menarik Menggunakan Prezi
Membuat Presentasi Menarik Menggunakan Prezi
 
Tutor core 01 handle and store materials
Tutor core 01 handle and store materialsTutor core 01 handle and store materials
Tutor core 01 handle and store materials
 
Pedestrian safety powerpoint
Pedestrian safety powerpointPedestrian safety powerpoint
Pedestrian safety powerpoint
 
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUGConsumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
 
Portrait de startuper #40 - DraftQuest - David Meulemans
Portrait de startuper #40 - DraftQuest - David MeulemansPortrait de startuper #40 - DraftQuest - David Meulemans
Portrait de startuper #40 - DraftQuest - David Meulemans
 
Portrait de startuper #44 - Dynseo - Justine Sauquet
Portrait de startuper #44 - Dynseo - Justine SauquetPortrait de startuper #44 - Dynseo - Justine Sauquet
Portrait de startuper #44 - Dynseo - Justine Sauquet
 
GRF IDRC 2014_presentation_CALVELLO
GRF IDRC 2014_presentation_CALVELLOGRF IDRC 2014_presentation_CALVELLO
GRF IDRC 2014_presentation_CALVELLO
 
4- Emergency Preparedness in the supply chain- Chaimongkol
4- Emergency Preparedness in the supply chain- Chaimongkol4- Emergency Preparedness in the supply chain- Chaimongkol
4- Emergency Preparedness in the supply chain- Chaimongkol
 
порядок аттест педработ
порядок аттест педработпорядок аттест педработ
порядок аттест педработ
 
о методобъединении
о методобъединениио методобъединении
о методобъединении
 
4344
43444344
4344
 
Лекция №1
Лекция №1Лекция №1
Лекция №1
 

Similar to Metrics on the front, data in the back

Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
Edward Capriolo
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
Chris Alfano
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-components
James Stone
 

Similar to Metrics on the front, data in the back (20)

How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
 
Downloading the internet with Python + Scrapy
Downloading the internet with Python + ScrapyDownloading the internet with Python + Scrapy
Downloading the internet with Python + Scrapy
 
With Great Nerdery Comes Great Responsibility
With Great Nerdery Comes Great Responsibility With Great Nerdery Comes Great Responsibility
With Great Nerdery Comes Great Responsibility
 
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy NguyenGrokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
Revolver
RevolverRevolver
Revolver
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 
Make your animations perform well
Make your animations perform wellMake your animations perform well
Make your animations perform well
 
Fast by Default
Fast by DefaultFast by Default
Fast by Default
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Turku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-componentsTurku loves-storybook-styleguidist-styled-components
Turku loves-storybook-styleguidist-styled-components
 
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
Playing With The Web
Playing With The WebPlaying With The Web
Playing With The Web
 
Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017 Make Your Animations Perform Well - JS Conf Budapest 2017
Make Your Animations Perform Well - JS Conf Budapest 2017
 

More from DiUS

More from DiUS (20)

Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
 
Serverless microservices: Test smarter, not harder
Serverless microservices: Test smarter, not harderServerless microservices: Test smarter, not harder
Serverless microservices: Test smarter, not harder
 
Test Smart, not hard
Test Smart, not hardTest Smart, not hard
Test Smart, not hard
 
10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins
 
Trends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesTrends and development practices in Serverless architectures
Trends and development practices in Serverless architectures
 
Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...
 
The Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEMThe Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEM
 
GameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos EngineeringGameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos Engineering
 
The case for consumer-driven contracts
The case for consumer-driven contractsThe case for consumer-driven contracts
The case for consumer-driven contracts
 
Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!
 
Crafting Quality Software
Crafting Quality SoftwareCrafting Quality Software
Crafting Quality Software
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
DIY IoT Backend
DIY IoT BackendDIY IoT Backend
DIY IoT Backend
 
How to Build Hardware Lean
How to Build Hardware LeanHow to Build Hardware Lean
How to Build Hardware Lean
 
Behaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ FoggBehaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ Fogg
 
Power in Agile Teams
Power in Agile Teams Power in Agile Teams
Power in Agile Teams
 
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
 
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
 

Recently uploaded

一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
aagad
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
abhinandnam9997
 

Recently uploaded (12)

1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
The Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI StudioThe Best AI Powered Software - Intellivid AI Studio
The Best AI Powered Software - Intellivid AI Studio
 
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
一比一原版UTS毕业证悉尼科技大学毕业证成绩单如何办理
 
Article writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptxArticle writing on excessive use of internet.pptx
Article writing on excessive use of internet.pptx
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
The AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdfThe AI Powered Organization-Intro to AI-LAN.pdf
The AI Powered Organization-Intro to AI-LAN.pdf
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
Stay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design TrendsStay Ahead with 2024's Top Web Design Trends
Stay Ahead with 2024's Top Web Design Trends
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 

Metrics on the front, data in the back

  • 1. Metrics on the front, party data in the back Approaches to bringing metrics to the front end Matt Fellows @matthewfellows github.com/mefellows
  • 2. WARNING: Intended for mature audiences only. Content may contain harsh and/or violent outbreaks concerning Adobe Analytics. Offended viewers are advised to stop using the product immediately and take the team go-karting with the savings.
  • 3. Why do we need metrics? Down the rabbit hole
  • 4. “Alice: Would you tell me, please, which way I ought to go from here? The Cheshire Cat: That depends a good deal on where you want to get to. Alice: I don't much care where. The Cheshire Cat: Then it doesn't much matter which way you go. ― Lewis Carroll, Alice in Wonderland
  • 5. If we are to succeed, we ought to know where we are and where we’re going The lesson?
  • 6.
  • 7. Hit Counters - The Analytics Dark Ages Hit counters tell us basically nothing about how to improve our website: ● We don’t know what we could do to improve the site ● We can’t distinguish between real people and crawlers ● We can’t tell if changing the comic, or the navigation or making pretty pictures makes any difference at all We need a way to measure things in more detail to improve our chances of adding business value So we evolved….
  • 8. Analytics 2.0 s.businessUnit = 'ske'; s.country = 'au'; s.platform = 'd'; s.section = 'homepage'; require(['omniture'], function (omniture) { var queueTrackingOnly = 'false'; if (queueTrackingOnly == 'true' && omniture.store) { omniture.store({"pageName":"home page","channel":"home","prop4":"home page","prop6":"home","prop11":"b19ee802-ce67-e511-80e9- 6c3be5b017d4","prop12":"loggedin","prop54":"c79529bc-4559-49be-a5b6-8fc8b42c27be","eVar54":"c79529bc-4559-49be-a5b6-8fc8b42c27be"}); } else { s.pageName = 'home page'; s.channel = 'home'; s.prop4 = 'home page'; s.prop6 = 'home'; s.prop11 = 'b19ee802-ce67-e511-80e9-6c3be5b017d4'; s.prop12 = 'loggedin'; s.prop54 = 'c79529bc-4559-49be-a5b6-8fc8b42c27be'; var s_code = s.t(); if (s_code) document.write(s_code); } });
  • 9. Analytics 2.0 Instead of sticking hit counters on our websites, we stuck large chunks of of javascript into our web pages... And it was good
  • 10.
  • 11. Analytics 2.0 Told us a hell of a lot about what people did on our websites (Impressions, Attribution, Funnel Analysis and so on). But... 1. Designed for business users 2. Lack APIs 3. Cumbersome to implement 4. Real-time (no - they are lying) 5. Data Monoliths (do you own your data and can you query it?)
  • 12.
  • 14. Lean Startup Build, measure, learn and repeat. This changed the landscape in a number of fundamental ways: ● Develop -> deploy cycle had to shrink ● Rise of DevOps & Continuous Delivery ● Requires better visibility into operational and business metrics Previous generation tooling insufficient for this purpose.
  • 15. New Generation Analytics Platforms Complement traditional analytics tools, and are 1. Designed for technical users 2. API first 3. Easier to implement 4. Near real-time 5. Data ownership 6. Alerts/Notifications We can now begin ask questions and answer them immediately: “Did my change to the Widget result in more, less or no change?”
  • 16. New Generation Analytics Platforms Commercial 1. keen.io 2. segment.io 3. trak.io 4. KISS Metrics 5. Datadog <- this one is nice! Open Source: 4. SGG Stack (Statsd, Graphite and Grafana) <- start here 5. TICK Stack (Telegraf, InfluxDB, Chronograf, Kapacitor)
  • 17. We can take ownership of the metrics we need
  • 18. Isomorphic Universal Metrics Metrics on the front and back
  • 19. Creating, deploying and integrating our own metrics stack is easy. Implementation
  • 21. 1. React front-end (canonical TODO App) + Redux 2. Metrics Stack a. Statsd as wire protocol b. InfluxDB as the time-series database c. Bucky to broker web <-> InfluxDB 3. All wired together with Docker Challenge: Sending metrics to statsd (UDP) from Node and direct from the browser. Implementation
  • 22. Bucky to the rescue Implementation
  • 23. Setup Bucky... import bucky from 'bucky'; import { metricsHost, metricsIsEnabled } from 'config'; bucky .setOptions({ host: metricsHost, active: metricsIsEnabled });
  • 24. import analytics from 'redux-analytics'; const track = ({ type, payload = {} }) => { const { value = 1 } = payload; const key = `mymetricnamespace.actions.${type}`; bucky.count(key, value); }; const analyticsMiddleware = analytics(track, ({ meta }) => meta.metrics); Create some Redux middleware
  • 25. Add metadata to Flux Standard Action const action = { type: 'MY_ACTION', meta: { metrics: { type: 'my-analytics-event', payload: { postfix: 'special', // value: 3 // default is 1 } } } }; // Will result in the statsd metric ${metricsPrefix}.actions.my-analytics-event.special to be incremented by 3
  • 26.
  • 27. Manual Instrumentation import bucky from 'bucky'; class HelloApp extends React.Component { constructor(props) { super(props); bucky.send('helloapp.constructor', 2432.43434); // gauge this.state = { filterType: 'all' }; }
  • 28. Creating, deploying and integrating our own metrics stack is easy.
  • 29. Demo Universal React with metrics https://github.com/mefellows/react-redux-todo-app/
  • 31. ■ Bucky (http://github.hubspot.com/bucky/) ■ Metrics, Metrics Everywhere (https://dl.dropboxusercontent.com/u/2744222/2011-04-09- Metrics-Metrics-Everywhere.pdf) ■ Redux Analytics (https://github.com/markdalgleish/redux- analytics) ■ StatsD (https://github.com/etsy/statsd/) ■ TICK Docker (https://github.com/mefellows/docker-tick) ■ Fun Omniture Memes ■ TODO App: React + Redux + Bucky + TICK Demo (https://github.com/mefellows/react-redux-todo-app/) References