feat(REQ-2516): 添加微服务间调用异常信息记录
This commit is contained in:
parent
d61c04e123
commit
ddf1bbcd9d
@ -94,8 +94,11 @@ public final class BasicRecordExceptionHandler implements PriorityOrdered {
|
|||||||
if (CollectionUtils.isEmpty(elements)) {
|
if (CollectionUtils.isEmpty(elements)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<String> filterPackageNames = Arrays.asList(request.getParameterValues(MICRO_SERVER_RECORD_ERROR_GET_PARAM_NAME));
|
String[] parameterValues = request.getParameterValues(MICRO_SERVER_RECORD_ERROR_GET_PARAM_NAME);
|
||||||
filterPackageNames = CollectionUtils.isEmpty(filterPackageNames) ? Lists.newArrayList(MICRO_SERVER_RECORD_ERROR_FILTER_PACKAGE_VALUE) : filterPackageNames;
|
List<String> filterPackageNames = Lists.newArrayList(MICRO_SERVER_RECORD_ERROR_FILTER_PACKAGE_VALUE);
|
||||||
|
if(Objects.nonNull(parameterValues) && parameterValues.length > 0) {
|
||||||
|
filterPackageNames = Arrays.asList(parameterValues);
|
||||||
|
}
|
||||||
for (StackTraceElement e : elements) {
|
for (StackTraceElement e : elements) {
|
||||||
if (StringUtils.hasText(e.getClassName())) {
|
if (StringUtils.hasText(e.getClassName())) {
|
||||||
filterPackageNames.stream().filter(i -> e.getClassName().contains(i)).findAny().ifPresent(t -> {
|
filterPackageNames.stream().filter(i -> e.getClassName().contains(i)).findAny().ifPresent(t -> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user