Spring Insight – What Just Happened?
Derek Beauregard
Agenda • What Just Happened?
– Agile Development, QA, Stress & Performance tesCng – Logging? – Debugger?
• STS & Integrated in Tomcat (tc Server) • Spring Insight Demo Time • JMeter & Google Chrome Speed Tracer • How it works • Plugins & AnnotaCons • Wrap up
Who is this guy?
Contact Info
• Derek Beauregard – Sr. Field Engineer, Pivotal (formerly VMware & formerly Spring Source) – [email protected] – goPivotal.com – vfabric.co
My Fancy New Web ApplicaCon
ApplicaCon Development & TesCng
• So your building your fancy new web applicaCon – Is it working the way you expected? – What caused that failure? – How is the performance? – Why is it slow? – What the heck is Hibernate (or whatever) doing?
My Fancy New Web ApplicaCon
What do you do when it fails?
• Check the logs? – Timestamps – Session IDs, User IDs – Log all the parameters – UGH?
• Run the debugger? – Typically doesn’t help with performance
• And what do you do in QA and Performance TesCng? When it fails? When it is slow?
There has got to be a beXer way!
• Spring Insight!
BETTER WAY
Demo
Google Speed Tracer
Web ApplicaCon
Spring Insight
Client (Browser,
JMeter, etc.)
Web Layer
Service Layer
Data Layer DB
Spring Insight
Messaging
Caching
How does it work?
• Spring Insight uses automaCc code instrumentaCon to monitor your applicaCon
• It does this by introspecCng exisCng annotaCons and interfaces for key aspects of your applicaCon
• It then uses AspectJ AOP point cuts to monitor the code
• Runs in tc Server (Tomcat) beside your web applicaCon
Plugins
Custom…
Spring Integra;on
More Plugins • AnnotaCons • Akka • Axion • BlazeDS • Cassandra • Eclipse-‐Persistence • Ehcache • Ejb3 • Files-‐tracker • GemFire • Grails • Hadoop • Hibernate • HXpClient3/4 • jax-‐rs • Jcr
• JDBC • JMS • JMX • JNDI • Jolt • JPA • JTA • JWS • LDAP • Logging • Mail • MongoDB • Portlet • Quartz • RabbitMQ • Redis
• RMI • Run-‐exec • Servlet • Socket • Spring-‐Batch • Spring-‐Core • Spring-‐Data • Spring-‐IntegraCon • Spring-‐Neo4j • Spring-‐Security • Spring-‐tx • Spring-‐web • Spring-‐WebFlow • Struts2 • Tomcat • Developer Kit & GitHub
Plugins
• Many plugins are supported out of the box • You can get more from GitHub or develop your own using the Developer Kit
• GitHub: hXps://github.com/SpringSource/spring-‐insight-‐plugins
@InsightOpera;on
@InsightEndPoint
@InsightObscure
@InsightSensi;ve
AnnotaCons
• If you want to monitor more aspects of your code you can simply annotate the methods
Dynamic Concrete Aspects <?xml version="1.0" encoding="UTF-‐8"?> <aspectj> <aspects> <concrete-‐aspect name="foo.bar.BazAspect” extends="com.springsource.insight.collecCon.method.custom.CustomConcreCzedOperaConCollecConAspect"> <pointcut name="collecConPoint"
expression="execu;on(* foo.bar.Baz.mySuperDuperMethod(..))" /> </concrete-‐aspect> </aspects> </aspectj>
Dynamic Concrete Aspects
• Instrument classes and methods that are not covered by plugins or Insight annotaCons
• Defined in AspectJ XML configuraCon • No changes to source code required!
Spring Insight • AutomaCc • No Coding & No ConfiguraCon
• Shows Errors • Shows Performance • Pluggable • Answers: “What Just Happened?”
Wrap Up
• Helps developers, QA Testers, and in Stress and Performance tesCng to answer: “What Just Happened?”
40 © Copyright 2013 Pivotal. All rights reserved.
FURTHER INFORMATION • Me: [email protected]
• Main Page & Downloads: http://www.springsource.org/insight
• Documentation: http://pubs.vmware.com/vfabric53/topic/com.vmware.vfabric.tc-server.2.9/devedition/about.html
• Video: http://www.youtube.com/watch?v=nBqSh7nVNzc
• GitHub: https://github.com/SpringSource/spring-insight-plugins