Dubbo 日志

更新时间: 2019-06-21

SOFATracer 集成 Dubbo 后输出请求的链路数据格式,默认为 JSON 数据格式。

Dubbo 服务消费方摘要日志(dubbo-client-digest.log)

以 JSON 格式输出的数据,相应 key 的含义解释如下:

key表达含义
time日志打印时间
traceIdTraceId
spanIdSpanId
span.kindspan 类型
local.app当前应用名
protocol协议
service服务接口
method调用方法
invoke.type调用类型
remote.host目标主机
remote.port目标端口
local.host本地主机
client.serialize.time请求序列化时间
client.deserialize.time响应反序列化时间
req.size.bytesRequest Body 大小
resp.size.bytesResponse Body 大小
result.code返回结果状态码
current.thread.name当前线程名
time.cost.milliseconds请求耗时(ms)
baggage透传的 baggage 数据

样例:

  1. {"time":"2019-04-03 11:36:01.909","traceId":"0a0fe8451554262561656100126684","spanId":"0","span.kind":"client","local.app":"dubbo-consumer","protocol":"dubbo","service":"com.alipay.sofa.tracer.examples.dubbo.facade.HelloService","method":"SayHello","invoke.type":"sync","remote.host":"10.15.232.69","remote.port":"20880","local.host":"10.15.232.69","client.serialize.time":35,"client.deserialize.time":0,"req.size.bytes":323,"resp.size.bytes":323,"result.code":"00","current.thread.name":"main","time.cost.milliseconds":252,"baggage":""}

Dubbo 服务提供方摘要日志(dubbo-server-digest.log)

以 JSON 格式输出的数据,相应 key 的含义解释如下:

key表达含义
time日志打印时间
traceIdTraceId
spanIdSpanId
span.kindspan 类型
local.app当前应用名
service服务接口
method调用方法
local.host本地主机
local.host本地端口
protocol协议
server.serialize.time响应序列化时间
server.deserialize.time请求反序列化时间
result.code结果状态码
current.thread.name当前线程名
time.cost.milliseconds请求耗时(ms)
baggage透传的 baggage 数据

样例:

  1. {"time":"2019-04-03 11:36:01.880","traceId":"0a0fe8451554262561656100126684","spanId":"0","span.kind":"server","local.app":"dubbo-provider","service":"com.alipay.sofa.tracer.examples.dubbo.facade.HelloService","method":"SayHello","local.host":"10.15.232.69","local.port":"54178","protocol":"dubbo","server.serialize.time":0,"server.deserialize.time":27,"result.code":"00","current.thread.name":"DubboServerHandler-10.15.232.69:20880-thread-2","time.cost.milliseconds":3,"baggage":""}

Dubbo 统计日志

stat.key 即本段时间内的统计关键字集合,统一关键字集合唯一确定一组统计数据,包含local.app、service、和 method 字段.

key表达含义
time日志打印时间
stat.keylocal.app当前应用名
method调用方法
service 服务名
count本段时间内请求次数
total.cost.milliseconds本段时间内的请求总耗时(ms)
success请求结果:Y 表示成功;N 表示失败
load.test压测标记:T 是压测;F 不是压测

样例:

  • dubbo-client-stat.log
  1. {"time":"2019-04-03 11:37:01.650","stat.key":{"method":"SayHello","local.app":"dubbo-consumer","service":"com.alipay.sofa.tracer.examples.dubbo.facade.HelloService"},"count":1,"total.cost.milliseconds":252,"success":"Y"}
  • dubbo-server-stat.logjson{"time":"2019-04-03 11:37:01.872","stat.key":{"method":"SayHello","remote.app":"dubbo-provider","service":"com.alipay.sofa.tracer.examples.dubbo.facade.HelloService"},"count":1,"total.cost.milliseconds":3,"success":"Y"}