Skip to content

Commit af47f83

Browse files
committed
Pass context to topic event logs where available
1 parent d1e1624 commit af47f83

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fixed not passing request context to topic event logs
2+
13
## v3.99.6
24
* Added log grpc messages metadata on trace log level for topic writer
35

log/topic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func internalTopic(l Logger, d trace.Detailer) (t trace.Topic) {
133133
if d.Details()&trace.TopicReaderStreamEvents == 0 {
134134
return nil
135135
}
136-
ctx := with(context.Background(), TRACE, "ydb", "topic", "reader", "commit")
136+
ctx := with(*info.RequestContext, TRACE, "ydb", "topic", "reader", "commit")
137137
start := time.Now()
138138
l.Log(ctx, "start",
139139
kv.String("topic", info.Topic),
@@ -404,7 +404,7 @@ func internalTopic(l Logger, d trace.Detailer) (t trace.Topic) {
404404
if d.Details()&trace.TopicReaderMessageEvents == 0 {
405405
return nil
406406
}
407-
ctx := with(context.Background(), TRACE, "ydb", "topic", "reader", "read", "messages")
407+
ctx := with(*info.RequestContext, TRACE, "ydb", "topic", "reader", "read", "messages")
408408
start := time.Now()
409409
l.Log(ctx, "read messages called, waiting...",
410410
kv.Int("min_count", info.MinCount),

0 commit comments

Comments
 (0)