Skip to content

Commit

Permalink
Merge branch '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 b410174 + 35807f9 commit ea79e74
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 158 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,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 @@ -293,9 +293,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 ea79e74

Please sign in to comment.