diff --git a/spans/discovery.go b/spans/discovery.go index c2c9e0932..d6263cca0 100644 --- a/spans/discovery.go +++ b/spans/discovery.go @@ -1,6 +1,7 @@ package spans import ( + "fmt" "github.com/ydb-platform/ydb-go-sdk/v3/internal/kv" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) @@ -17,15 +18,16 @@ func discovery(adapter Adapter) (t trace.Discovery) { ) return func(info trace.DiscoveryDiscoverDoneInfo) { - endpoints := make([]string, len(info.Endpoints)) - for i, e := range info.Endpoints { - endpoints[i] = e.String() + if info.Error != nil { + start.Error(info.Error) + } else { + endpoints := make([]string, len(info.Endpoints)) + for i, e := range info.Endpoints { + endpoints[i] = e.String() + } + start.Log(fmt.Sprintf("endpoints=%v", endpoints)) } - finish( - start, - info.Error, - kv.Strings("endpoints", endpoints), - ) + start.End() } } diff --git a/spans/driver.go b/spans/driver.go index 774e236d6..825d98554 100644 --- a/spans/driver.go +++ b/spans/driver.go @@ -298,11 +298,11 @@ func driver(adapter Adapter) trace.Driver { //nolint:gocyclo,funlen for i, e := range info.Dropped { dropped[i] = e.String() } + start.Log(fmt.Sprintf("endpoints=%v", endpoints)) + start.Log(fmt.Sprintf("added=%v", added)) + start.Log(fmt.Sprintf("dropped=%v", dropped)) start.End( kv.String("local_dc", info.LocalDC), - kv.Strings("endpoints", endpoints), - kv.Strings("added", added), - kv.Strings("dropped", dropped), ) } }, diff --git a/spans/scripting.go b/spans/scripting.go index e67f974ed..788e3fd95 100644 --- a/spans/scripting.go +++ b/spans/scripting.go @@ -14,7 +14,6 @@ func scripting(adapter Adapter) (t trace.Scripting) { info.Context, info.Call.FunctionID(), kv.String("query", info.Query), - kv.String("params", safeStringer(info.Parameters)), ) return func(info trace.ScriptingExecuteDoneInfo) { @@ -47,7 +46,6 @@ func scripting(adapter Adapter) (t trace.Scripting) { info.Context, info.Call.FunctionID(), kv.String("query", info.Query), - kv.String("params", safeStringer(info.Parameters)), ) return func(