diff --git a/trace/baseTraceDetail.go b/trace/baseTraceDetail.go index 7bc4bf20a..0080b47a8 100644 --- a/trace/baseTraceDetail.go +++ b/trace/baseTraceDetail.go @@ -2,12 +2,13 @@ package trace import ( "fmt" - "github.com/farseer-go/fs/dateTime" - "github.com/farseer-go/fs/path" - "github.com/farseer-go/fs/trace/eumCallType" "runtime" "strings" "time" + + "github.com/farseer-go/fs/dateTime" + "github.com/farseer-go/fs/path" + "github.com/farseer-go/fs/trace/eumCallType" ) // BaseTraceDetail 埋点明细(基类) @@ -51,6 +52,8 @@ func (receiver *BaseTraceDetail) SetSql(connectionString string, dbName string, } func (receiver *BaseTraceDetail) SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int) { } +func (receiver *BaseTraceDetail) SetRows(rows int) { +} // End 链路明细执行完后,统计用时 func (receiver *BaseTraceDetail) End(err error) { diff --git a/trace/emptyManager.go b/trace/emptyManager.go index dcf67a853..6e8900c23 100644 --- a/trace/emptyManager.go +++ b/trace/emptyManager.go @@ -89,3 +89,6 @@ func (*emptyTraceDetail) SetSql(connectionString string, DbName string, tableNam } func (*emptyTraceDetail) SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int) { } + +func (*emptyTraceDetail) SetRows(rows int) { +} diff --git a/trace/iTraceDetail.go b/trace/iTraceDetail.go index c6cfb7008..9849a0327 100644 --- a/trace/iTraceDetail.go +++ b/trace/iTraceDetail.go @@ -15,4 +15,6 @@ type ITraceDetail interface { GetLevel() int // SetHttpRequest 设置Http请求出入参 SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int) + // 设置得到的数据量 + SetRows(rows int) }