Skip to content

Commit

Permalink
Pass context to topic event logs where available
Browse files Browse the repository at this point in the history
  • Loading branch information
qrort committed Feb 6, 2025
1 parent 7ec7b21 commit 0dbc3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Fixed not passing request context to topic event logs

## v3.99.5
* Fixed error `Empty query text` using prepared statements and `ydb.WithExecuteDataQueryOverQueryClient(true)` option
* Prepared statements always send query text on Execute call from now (previous behaviour - send query ID)
Expand Down
4 changes: 2 additions & 2 deletions log/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func internalTopic(l Logger, d trace.Detailer) (t trace.Topic) {
if d.Details()&trace.TopicReaderStreamEvents == 0 {
return nil
}
ctx := with(context.Background(), TRACE, "ydb", "topic", "reader", "commit")
ctx := with(*info.RequestContext, TRACE, "ydb", "topic", "reader", "commit")
start := time.Now()
l.Log(ctx, "start",
kv.String("topic", info.Topic),
Expand Down Expand Up @@ -400,7 +400,7 @@ func internalTopic(l Logger, d trace.Detailer) (t trace.Topic) {
if d.Details()&trace.TopicReaderMessageEvents == 0 {
return nil
}
ctx := with(context.Background(), TRACE, "ydb", "topic", "reader", "read", "messages")
ctx := with(*info.RequestContext, TRACE, "ydb", "topic", "reader", "read", "messages")
start := time.Now()
l.Log(ctx, "read messages called, waiting...",
kv.Int("min_count", info.MinCount),
Expand Down

0 comments on commit 0dbc3b6

Please sign in to comment.