Many products promise to provide insights and value from whatever data you throw at them. There’s no doubt they can provide something, but you can’t escape the law of GIGO.
As a result, it’s on you as a developer, product manager and business to care about the data you are creating. This presentation will demonstrate some best practices on how to go about this, regardless of your platform.
Now for some definitions. There is a lot of stuff generated by the system – let’s classify the stuff broadly and narrow on what I am going to be talking about.
Quick review of patterns we’ll use. Interception is the secret sauce here. We want to be able to get in front of every call to every object or component in our system. That lets us see what data is being passed around, who is doing it, and how long it took.
Indent the bullets
Developing Highly Instrumented Applications with Minimal Effort
with minimal effort
Principal Engineer, Chief Caffeine Officer - Intuit
• Quality Data
• .Net Example
• Java Example
• Node.js Example
GOAL: You should be able to apply this to your application today
There’s No Free Lunch
Quality In, Insight Out
Most apps start with only the framework or
app server logging (or nothing!)
None of the above is interesting to the
business or the developer.
You can’t get if you don’t give – there are
many ways to give, and many classes of
data to provide.
Classes of System Output
• JMX/WMI/SNMP monitoring
• Apache/IIS/nginx access logs
Overtly triggers alerts
Source of business
• Aids in troubleshooting
Passively triggers alerts
Source of performance
• Source of usage data
Leverage an HTTP pipeline for context
Leverage aspects for interception
Apply best practices
Minimize impact on existing code
MVC Music Store Intervention (Demo)
Missing dependency injection/interception framework: Unity
Missing logging library: Log4Net, Buche
Add DI framework (Unity)
Configure aspects (Interception)
Configure controller factory, container locator
Set up logger (Log4Net)
Configure log pattern and targets (Log4Net.xml)
Wire up logging interceptor
Wire up LogActionFilter and BaseLoggingController
Spring Pet Clinic Intervention (Demo)
1. Set up logger
a. Configure log pattern (to support context data)
b. Configure targets (rotating file)
2. Create LogAspect.java and @Instrumentable attribute
a. Capture calling context
b. Start/stop timing
3. Create LogInterceptor.java
a. Capture request metadata
b. Set MDC
c. Start/stop timing
4. Configure aspect bean
1. Configure interceptor bean
1. Annotate the methods we care about
Got Log? Now Get Intimate With Your App
It is YOUR responsibility as a developer to
provide useful operational and business data.
It is not hard, and most of it is for free once you
have the patterns in place.
The same patterns and practices can be applied
to practically any platform, and any type of
application or service.
When you provide consistent and predictable
data others can build on your greatness
Get the Code
Spring Pet Clinic Intervention:
MVC Music Store Intervention:
Intuit Speakers @ Silicon Code Camp 2013:
9:45 a.m. - Ramakrishna Kollipara – “Complete Automation of Performance Testing”
1:45 p.m. - Joe Wells - “QBO: Journey From legacy Java app to a Client-side HTML5
3:30 p.m. - Naga Addagadde & Sangeeta Narang – “Intuit APIs for Financial Transaction
5:00 p.m. Ted Drake –“Hitting the Accessibility High Notes with ARIA”
9:15 a.m. - Eugene Krivopaltsev –“Building Native Mobile Apps with Custom Views”
1:15 p.m. - Tim Hobson – “Developing Highly Instrumental Applications with Minimal
For more information about joining our organization visit our booth or
connect with our onsite recruiter:
You don't want to miss out on a chance to win this cool headset.
Stop by our booth to enter!
Want to talk more?
I’ll be at the Intuit booth today 3-5 PM.