public class JamonAspect extends Object
And Exceptions if the method throws one. Exceptions are tracked under a general name for all exceptions 'com.jamonapi.Exceptions', as
well as the specific exception name (i.e. java.io.IOException, ...). An example follows:
JAMon Label=java.io.IOException, Units=Exception: (LastValue=1.0, Hits=10.0, Avg=1.0, Total=10.0, Min=1.0, Max=1.0, Active=0.0, Avg Active=0.0, Max Active=0.0, First Access=Tue Jun 03 21:11:21 CEST 2014, Last Access=Tue Jun 03 21:11:26 CEST 2014)
JAMon Label=com.jamonapi.Exceptions, Units=Exception: (LastValue=1.0, Hits=10.0, Avg=1.0, Total=10.0, Min=1.0, Max=1.0, Active=0.0, Avg Active=0.0, Max Active=0.0, First Access=Tue Jun 03 21:11:21 CEST 2014, Last Access=Tue Jun 03 21:11:26 CEST 2014)
The detailed stacktrace is kept if an exception is thrown. This can be viewed in the jamon war, if setExceptionBufferListener is enabled which it is by default.
There are also method argument values which can be saved in the jamon details for both the method invocation jamon details and the stack trace jamon details.
Spring can automatically find this aspect - or alternatively it could be created explicitly in applicationContext.xml. See applicationContext.xml in the test code for some sample usage. By default each aspect is a singleton within the applicationContext
Modifier and Type | Field and Description |
---|---|
protected JamonAopKeyHelperInt |
keyHelper |
Constructor and Description |
---|
JamonAspect() |
JamonAspect(JamonAopKeyHelperInt keyHelper) |
Modifier and Type | Method and Description |
---|---|
Object |
monitor(org.aspectj.lang.ProceedingJoinPoint proceedingJoinPoint)
Wrap jamon calls around the invoked method.
|
void |
setExceptionBufferListener(boolean enable)
If true is passed in then a buffer will contain the most recent stack traces.
|
void |
setKeyHelper(JamonAopKeyHelperInt keyHelper) |
void |
setUseArgsWithExceptionDetails(boolean useArgsWithExceptionDetails)
Specifies to have the methods arguments viewable in the jamon monitor details.
|
void |
setUseArgsWithMethodDetails(boolean useArgsWithMethodDetails)
Specifies to have the methods arguments viewable in the jamon monitor details.
|
protected JamonAopKeyHelperInt keyHelper
public JamonAspect()
public JamonAspect(JamonAopKeyHelperInt keyHelper)
public Object monitor(org.aspectj.lang.ProceedingJoinPoint proceedingJoinPoint) throws Throwable
Throwable
public void setKeyHelper(JamonAopKeyHelperInt keyHelper)
public void setExceptionBufferListener(boolean enable)
enable
- public void setUseArgsWithMethodDetails(boolean useArgsWithMethodDetails)
useArgsWithMethodDetails
- public void setUseArgsWithExceptionDetails(boolean useArgsWithExceptionDetails)
useArgsWithExceptionDetails
- Copyright © 2015. All rights reserved.