Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spring insight what just happened

1,992 views

Published on

Presentation by Derek Beauregard at the Boulder Java User's Group on August 13, 2013. See more at http://boulderjug.org

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Spring insight what just happened

  1. 1. Spring  Insight  –  What  Just   Happened?   Derek  Beauregard  
  2. 2. 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  
  3. 3. Who  is  this   guy?  
  4. 4. Contact  Info   •  Derek  Beauregard   – Sr.  Field  Engineer,  Pivotal  (formerly  VMware  &  formerly  Spring  Source)   – dbeauregard@gopivotal.com   – goPivotal.com   – vfabric.co  
  5. 5. My  Fancy  New  Web  ApplicaCon  
  6. 6. 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?  
  7. 7. My  Fancy  New  Web  ApplicaCon  
  8. 8. 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?  
  9. 9. There  has  got  to  be  a  beXer  way!   •  Spring  Insight!  
  10. 10. BETTER  WAY  
  11. 11.      Demo  
  12. 12. Google  Speed  Tracer    
  13. 13. Web  ApplicaCon   Spring  Insight   Client   (Browser,   JMeter,  etc.)   Web   Layer   Service   Layer   Data   Layer   DB   Spring   Insight   Messaging   Caching  
  14. 14. 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  
  15. 15. Plugins   Custom…   Spring   Integra;on  
  16. 16. 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  
  17. 17. 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  
  18. 18. @InsightOpera;on   @InsightEndPoint   @InsightObscure   @InsightSensi;ve  
  19. 19. AnnotaCons   •  If  you  want  to  monitor  more  aspects  of  your   code  you  can  simply  annotate  the  methods  
  20. 20. 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.CustomConcre CzedOperaConCollecConAspect">                        <pointcut  name="collecConPoint"      expression="execu;on(*  foo.bar.Baz.mySuperDuperMethod(..))"  />                </concrete-­‐aspect>          </aspects>   </aspectj>  
  21. 21. 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!  
  22. 22. Spring  Insight   •  AutomaCc   •  No  Coding  &  No   ConfiguraCon   •  Shows  Errors   •  Shows  Performance   •  Pluggable   •  Answers:  “What  Just   Happened?”  
  23. 23. Wrap  Up   •  Helps  developers,  QA  Testers,  and  in  Stress   and  Performance  tesCng  to  answer:  “What   Just  Happened?”  
  24. 24. 40© Copyright 2013 Pivotal. All rights reserved. FURTHER INFORMATION •  Me: dbeauregard@gopivotal.com •  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

×