diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d2643a8..58dd0f6f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Added session info into `trace.TableSessionBulkUpsertStartInfo` + ## v3.84.0 * Added `meta.WithTraceParent` context modifier for explicit putting traceparent header into grpc calls diff --git a/internal/table/session.go b/internal/table/session.go index 9acbe5de3..644d1499a 100644 --- a/internal/table/session.go +++ b/internal/table/session.go @@ -1258,9 +1258,8 @@ func (s *session) BulkUpsert(ctx context.Context, table string, rows value.Value var ( a = allocator.New() callOptions []grpc.CallOption - onDone = trace.TableOnSessionBulkUpsert( - s.config.Trace(), &ctx, - stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/v3/internal/table.(*session).BulkUpsert"), + onDone = trace.TableOnSessionBulkUpsert(s.config.Trace(), &ctx, + stack.FunctionID("github.com/ydb-platform/ydb-go-sdk/v3/internal/table.(*session).BulkUpsert"), s, ) ) defer func() { diff --git a/trace/table.go b/trace/table.go index fe0574215..1ae058c2b 100644 --- a/trace/table.go +++ b/trace/table.go @@ -158,6 +158,8 @@ type ( // Safe replacement of context are provided only inside callback function Context *context.Context Call call + + Session sessionInfo } // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals TableSessionBulkUpsertDoneInfo struct { diff --git a/trace/table_gtrace.go b/trace/table_gtrace.go index a9e6127fb..ef197a33b 100644 --- a/trace/table_gtrace.go +++ b/trace/table_gtrace.go @@ -1436,10 +1436,11 @@ func TableOnSessionKeepAlive(t *Table, c *context.Context, call call, session se } } // Internals: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#internals -func TableOnSessionBulkUpsert(t *Table, c *context.Context, call call) func(error) { +func TableOnSessionBulkUpsert(t *Table, c *context.Context, call call, session sessionInfo) func(error) { var p TableSessionBulkUpsertStartInfo p.Context = c p.Call = call + p.Session = session res := t.onSessionBulkUpsert(p) return func(e error) { var p TableSessionBulkUpsertDoneInfo