HBASE-27268 In trace log mode, the client does not print callId/startTime and the server does not print receiveTime (#4710)

Co-authored-by: jay.zhu <jay.zhu@huolala.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Fantasy-Jay 2022-08-20 20:50:40 +08:00 committed by GitHub
parent 74fd5b2e68
commit 32c135d8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -379,8 +379,8 @@ public abstract class AbstractRpcClient<T extends RpcConnection> implements RpcC
metrics.updateRpc(call.md, call.param, call.callStats);
}
if (LOG.isTraceEnabled()) {
LOG.trace(
"Call: " + call.md.getName() + ", callTime: " + call.callStats.getCallTimeMs() + "ms");
LOG.trace("CallId: {}, call: {}, startTime: {}ms, callTime: {}ms", call.id, call.md.getName(),
call.getStartTime(), call.callStats.getCallTimeMs());
}
if (call.error != null) {
if (call.error instanceof RemoteException) {

View File

@ -390,9 +390,10 @@ public abstract class RpcServer implements RpcServerInterface, ConfigurationObse
int qTime = (int) (startTime - receiveTime);
int totalTime = (int) (endTime - receiveTime);
if (LOG.isTraceEnabled()) {
LOG.trace(CurCall.get().toString() + ", response " + TextFormat.shortDebugString(result)
+ " queueTime: " + qTime + " processingTime: " + processingTime + " totalTime: "
+ totalTime);
LOG.trace(
"{}, response: {}, receiveTime: {}, queueTime: {}, processingTime: {}, totalTime: {}",
CurCall.get().toString(), TextFormat.shortDebugString(result),
CurCall.get().getReceiveTime(), qTime, processingTime, totalTime);
}
// Use the raw request call size for now.
long requestSize = call.getSize();