Create failed transaction with a custom exception

When to use: Plumbr is able to detect transactions, but is unable to automatically detect if they fail or associate the correct exception with the failure.

How: In this case, eu.plumbr.api.Plumbr.getCurrentSpan() should be called to get a reference to the automatically created span and then eu.plumbr.api.Span.fail(Throwable) be called to mark the span as failed and to optionally associate a specific exception as a root cause for the failure.

Example:

try {
 // do something that throws wrapped exception
} catch (Exception e) {
  Plumbr.getCurrentSpan().fail(e.getParent());
}