Skip to content

Commit

Permalink
Merge branch '1.12.x' into 1.13.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Sep 19, 2024
2 parents 61f48e2 + dca4904 commit 35807f9
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,19 @@ private Object processWithTimer(ProceedingJoinPoint pjp, Timed timed, String met
return ((CompletionStage<?>) pjp.proceed()).whenComplete(
(result, throwable) -> record(pjp, timed, metricName, sample, getExceptionTag(throwable)));
}
catch (Exception ex) {
record(pjp, timed, metricName, sample, ex.getClass().getSimpleName());
throw ex;
catch (Throwable e) {
record(pjp, timed, metricName, sample, e.getClass().getSimpleName());
throw e;
}
}

String exceptionClass = DEFAULT_EXCEPTION_TAG_VALUE;
try {
return pjp.proceed();
}
catch (Exception ex) {
exceptionClass = ex.getClass().getSimpleName();
throw ex;
catch (Throwable e) {
exceptionClass = e.getClass().getSimpleName();
throw e;
}
finally {
record(pjp, timed, metricName, sample, exceptionClass);
Expand Down Expand Up @@ -284,9 +284,9 @@ private Object processWithLongTaskTimer(ProceedingJoinPoint pjp, Timed timed, St
return ((CompletionStage<?>) pjp.proceed())
.whenComplete((result, throwable) -> sample.ifPresent(this::stopTimer));
}
catch (Exception ex) {
catch (Throwable e) {
sample.ifPresent(this::stopTimer);
throw ex;
throw e;
}
}

Expand Down
Loading

0 comments on commit 35807f9

Please sign in to comment.