Skip to content

Commit

Permalink
fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Oct 21, 2024
1 parent ee04de8 commit edec036
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 10 additions & 8 deletions spans/discovery.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package spans

import (
"fmt"

Check failure on line 4 in spans/discovery.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(github.com/ydb-platform/ydb-go-sdk/v3) (gci)
"github.com/ydb-platform/ydb-go-sdk/v3/internal/kv"
"github.com/ydb-platform/ydb-go-sdk/v3/trace"
)
Expand All @@ -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()
}
}

Expand Down
6 changes: 3 additions & 3 deletions spans/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
}
},
Expand Down
2 changes: 0 additions & 2 deletions spans/scripting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit edec036

Please sign in to comment.