Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more logs #211

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ public void onBeforeContextExecution(
if (StringUtils.isEmpty(plan.getErrorMessage())) {
plan.setErrorMessage(warmupCase.getSendErrorMessage());
}
throw new RuntimeException(
"Failed to warmup context: " + currentContext + " with case:" + warmupCase);
String errorMsg =
"Failed to warmup context: " + currentContext + " with case:" + warmupCase;
LOGGER.error(errorMsg);
throw new RuntimeException(errorMsg);
}
return true;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ DubboInvocation generateDubboInvocation(ReplayActionCaseItem caseItem,
ImmutablePair<String, String> interfaceNameAndMethod =
getInterfaceNameAndMethod(caseItem.getParent().getOperationName());
if (interfaceNameAndMethod == null) {
LOGGER.error("getInterfaceNameAndMethod failed, caseItem:{}", caseItem);
return null;
}
ServiceInstance instanceRunner = selectLoadBalanceInstance(caseItem.getId(),
caseItem.getParent().getTargetInstance());
if (instanceRunner == null) {
LOGGER.error("selectLoadBalanceInstance failed, caseItem:{}", caseItem);
return null;
}
String url = instanceRunner.getUrl();
Expand Down Expand Up @@ -102,11 +104,13 @@ private boolean doSend(ReplayActionCaseItem caseItem, Map<String, String> header
}
}
if (replayInvokeResult == null) {
LOGGER.error("replayInvokeResult is null, caseItem:{}", caseItem);
return false;
}

if (replayInvokeResult.getErrorMsg() != null) {
LOGGER.error("dubbo invoke error msg:{}", replayInvokeResult.getErrorMsg());
LOGGER.error("dubbo invoke error msg:{}, thrown:{}", replayInvokeResult.getErrorMsg(),
replayInvokeResult.getException());
}

ReplaySendResult targetSendResult = fromDubboResult(headers, dubboInvocation.getUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private boolean doSend(ReplayActionItem replayActionItem, ReplayActionCaseItem c
ServiceInstance instanceRunner = selectLoadBalanceInstance(caseItem.getId(),
replayActionItem.getTargetInstance());
if (instanceRunner == null) {
LOGGER.error("selectLoadBalanceInstance failed, caseItem:{}", caseItem);
return false;
}
String operationName = caseItem.requestPath();
Expand Down