Tracing analysis

更新时间:
复制 MD 格式

SOFARPC integrates SOFATracer to output trace data. This feature is enabled by default.

The default data format is JSON. The fields for each log are described in the following sections.

RPC client summary log (rpc-client-digest.log)

The following is an example of the log.

{"timestamp":"2018-05-20 17:03:20.708","tracerId":"1e27326d1526807000498100185597","spanId":"0","span.kind":"client","local.app":"SOFATracerRPC","protocol":"bolt","service":"com.alipay.sofa.tracer.examples.sofarpc.direct.DirectService:1.0","method":"sayDirect","current.thread.name":"main","invoke.type":"sync","router.record":"DIRECT","remote.ip":"127.0.0.1:12200","local.client.ip":"127.0.0.1","result.code":"00","req.serialize.time":"33","resp.deserialize.time":"39","resp.size":"170","req.size":"582","client.conn.time":"0","client.elapse.time":"155","local.client.port":"59774","baggage":""}

Parameter

Description

timestamp

Time the log was recorded.

tracerId

The TracerId of the request.

spanId

The SpanId of the request.

span.kind

The Span type.

local.app

The name of the current app.

protocol

The protocol type.

service

The service interface information.

method

The method name.

current.thread.name

The name of the current thread.

invoke.type

The call type.

router.record

The routing record.

remote.ip

The destination IP address.

local.client.ip

The local IP address.

result.code

The return code.

req.serialize.time

Request serialization time.

resp.deserialize.time

Response deserialization time.

resp.size

Response size in bytes.

req.size

Request size in bytes.

client.conn.time

Client connection time.

client.elapse.time

Total client call time.

local.client.port

The local client port.

baggage

Pass-through baggage data in key-value format.

RPC server-side summary log (rpc-server-digest.log)

The following is an example of the log.

{"timestamp":"2018-05-20 17:00:53.312","tracerId":"1e27326d1526806853032100185011","spanId":"0","span.kind":"server","service":"com.alipay.sofa.tracer.examples.sofarpc.direct.DirectService:1.0","method":"sayDirect","remote.ip":"127.0.0.1","remote.app":"SOFATracerRPC","protocol":"bolt","local.app":"SOFATracerRPC","current.thread.name":"SOFA-BOLT-BIZ-12200-5-T1","result.code":"00","server.pool.wait.time":"3","biz.impl.time":"0","resp.serialize.time":"4","req.deserialize.time":"38","resp.size":"170","req.size":"582","baggage":"",{"timestamp":"2018-05-20 17:03:05.646","tracerId":"1e27326d1526806985394100185589","spanId":"0","span.kind":"server","service":"com.alipay.sofa.tracer.examples.sofarpc.direct.DirectService:1.0","method":"sayDirect","remote.ip":"127.0.0.1","remote.app":"SOFATracerRPC","protocol":"bolt","local.app":"SOFATracerRPC","current.thread.name":"SOFA-BOLT-BIZ-12200-5-T1","result.code":"00","server.pool.wait.time":"2","biz.impl.time":"1","resp.serialize.time":"1","req.deserialize.time":"6","resp.size":"170","req.size":"582","baggage":"",{"timestamp":"2018-05-20 17:03:20.701","tracerId":"1e27326d1526807000498100185597","spanId":"0","span.kind":"server","service":"com.alipay.sofa.tracer.examples.sofarpc.direct.DirectService:1.0","method":"sayDirect","remote.ip":"127.0.0.1","remote.app":"SOFATracerRPC","protocol":"bolt","local.app":"SOFATracerRPC","current.thread.name":"SOFA-BOLT-BIZ-12200-5-T1","result.code":"00","server.pool.wait.time":"2","biz.impl.time":"0","resp.serialize.time":"1","req.deserialize.time":"4","resp.size":"170","req.size":"582","baggage":"",{"timestamp":"2018-05-20 17:04:19.966","tracerId":"1e27326d1526807046606100185635","spanId":"0","span.kind":"server","service":"com.alipay.sofa.tracer.examples.sofarpc.direct.DirectService:1.0","method":"sayDirect","remote.ip":"127.0.0.1","remote.app":"SOFATracerRPC","protocol":"bolt","local.app":"SOFATracerRPC","current.thread.name":"SOFA-BOLT-BIZ-12200-5-T1","result.code":"00","server.pool.wait.time":"2","biz.impl.time":"0","resp.serialize.time":"1","req.deserialize.time":"4","resp.size":"170","req.size":"582","baggage":""}

Parameter

Description

timestamp

Time the log was recorded.

tracerId

The TracerId of the request.

spanId

The SpanId of the request.

span.kind

The Span type.

server

The service interface information.

method

The method name.

remote.ip

The source IP address.

remote.app

The name of the source app.

protocol

The protocol type.

local.app

The name of the local app.

current.thread.name

The name of the current thread.

result.code

The return code.

server.pool.wait.time

The wait time in the server-side thread pool.

biz.impl.time

Business processing time.

resp.serialize.time

Response serialization time.

req.deserialize.time

Request deserialization time.

resp.size

Response size in bytes.

req.size

Request size in bytes.

baggage

Pass-through baggage data in key-value format.

RPC client statistics log (rpc-client-stat.log)

The following is an example of the log.

{"time":"2018-05-18 07:02:19.717","stat.key":{"method":"method","local.app":"client","service":"app.service:1.0"},"count":10,"total.cost.milliseconds":17,"success":"Y"}

Parameter

Description

time

Time the log was recorded.

stat.key

The key of the log.

method

The method information.

local.app

The name of the client app.

service

The service interface information.

count

The number of calls.

total.cost.milliseconds

The total time taken.

success

The call result:

  • Y: The call was successful.

  • N: The call failed.

RPC server-side statistics log (rpc-server-stat.log)

The following is an example of the log.

{"time":"2018-05-18 07:02:19.717","stat.key":{"method":"method","local.app":"client","service":"app.service:1.0"},"count":10,"total.cost.milliseconds":17,"success":"Y"}

Parameter

Description

time

Time the log was recorded.

stat.key

The key of the log.

method

The method information.

local.app

The name of the local app.

service

The service interface information.

count

The number of calls.

total.cost.milliseconds

The total time taken.

success

The call result:

  • Y: The call was successful.

  • N: The call failed.