Java Code Examples for com.jamonapi.utils.Misc#getExceptionTrace()

The following examples show how to use com.jamonapi.utils.Misc#getExceptionTrace() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Count the thrown exception and put the stack trace in the details portion of the key.
 * This will allow the stack trace to be viewed in the JAMon web application.
 */
protected void trackException(MonKey key, Throwable ex) {
	String stackTrace = "stackTrace=" + Misc.getExceptionTrace(ex);
	key.setDetails(stackTrace);

	// Specific exception counter. Example: java.lang.RuntimeException
	MonitorFactory.add(new MonKeyImp(ex.getClass().getName(), stackTrace, "Exception"), 1);

	// General exception counter which is a total for all exceptions thrown
	MonitorFactory.add(new MonKeyImp(MonitorFactory.EXCEPTIONS_LABEL, stackTrace, "Exception"), 1);
}
 
Example 2
/**
 * Count the thrown exception and put the stack trace in the details portion of the key.
 * This will allow the stack trace to be viewed in the JAMon web application.
 */
protected void trackException(MonKey key, Throwable ex) {
	String stackTrace = "stackTrace=" + Misc.getExceptionTrace(ex);
	key.setDetails(stackTrace);

	// Specific exception counter. Example: java.lang.RuntimeException
	MonitorFactory.add(new MonKeyImp(ex.getClass().getName(), stackTrace, "Exception"), 1);

	// General exception counter which is a total for all exceptions thrown
	MonitorFactory.add(new MonKeyImp(MonitorFactory.EXCEPTIONS_LABEL, stackTrace, "Exception"), 1);
}
 
Example 3
/**
 * Count the thrown exception and put the stack trace in the details portion of the key.
 * This will allow the stack trace to be viewed in the JAMon web application.
 */
protected void trackException(MonKey key, Throwable ex) {
	String stackTrace = "stackTrace=" + Misc.getExceptionTrace(ex);
	key.setDetails(stackTrace);

	// Specific exception counter. Example: java.lang.RuntimeException
	MonitorFactory.add(new MonKeyImp(ex.getClass().getName(), stackTrace, "Exception"), 1);

	// General exception counter which is a total for all exceptions thrown
	MonitorFactory.add(new MonKeyImp(MonitorFactory.EXCEPTIONS_LABEL, stackTrace, "Exception"), 1);
}
 
Example 4
/**
 * Count the thrown exception and put the stack trace in the details portion of the key.
 * This will allow the stack trace to be viewed in the JAMon web application.
 */
protected void trackException(MonKey key, Throwable ex) {
	String stackTrace = "stackTrace=" + Misc.getExceptionTrace(ex);
	key.setDetails(stackTrace);

	// Specific exception counter. Example: java.lang.RuntimeException
	MonitorFactory.add(new MonKeyImp(ex.getClass().getName(), stackTrace, "Exception"), 1);

	// General exception counter which is a total for all exceptions thrown
	MonitorFactory.add(new MonKeyImp(MonitorFactory.EXCEPTIONS_LABEL, stackTrace, "Exception"), 1);
}