DataSource log

Update time: 2019-06-21

Datasource Log Format

SOFATracer tracks the standard JDBC data source and outputs the chain data of SQL statement execution, in the default JSON format.

DataSource digest log (datasource-client-digest.log)

The data is output in JSON format. Each key meaning is as follows:

Key Meaning
Time log printing time Current application name
traceId TraceId
spanId SpanId Database name
Sql SQL execution statement
Result.code SQL execution status code
Total.time SQL statement execution total time
Connection.establish.span SQL execution connection establishment time
Db.execute.cost SQL execution time
Database.type Database type
Database.endpoint Database url Current thread name
Baggage Transparently transmitted baggage data


{"time":"2018-09-28 01:11:56.715","":"SOFATracerDataSource","traceId":"1e1bcab91538068316462100111113","spanId":"0.1.2","":"test","sql":"CREATE TABLE TEST(ID INT PRIMARY KEY%2C NAME VARCHAR(255));","result.code":"success","total.time":"228ms","connection.establish.span":"220ms","db.execute.cost":"3ms","database.type":"h2","database.endpoint":"jdbc:h2:~/test:-1","":"http-nio-8080-exec-1","baggage":""}

DataSource statistical Log (datasource-client-stat.log)

stat.key is the set of statistical keywords in this period, which uniquely determines a set of statistical data, including,, and SQL field.

Key Meaning
time Log printing time
stat.key Current application name Database name
sql SQL execution statement
count SQL execution count in this period
total.cost.milliseconds Total duration (ms) for SQL execution in this period
success Request result: Y for success; N for failure
load.test Pressure mark: T for pressure test; F for non-pressure test


{"time":"2018-09-28 01:12:43.647","stat.key":{"":"SOFATracerDataSource","":"test", "sql":"CREATE TABLE TEST(ID INT PRIMARY KEY%2C NAME VARCHAR(255));"},"count":1,"total.cost.milliseconds":228,"success":"true","load.test":"F"}