@@ -315,7 +315,10 @@ func (c *Client) StartReader(
315
315
if err != nil {
316
316
return nil , err
317
317
}
318
- trace .TopicOnReaderStart (internalReader .Tracer (), internalReader .ID (), consumer , err )
318
+
319
+ logCtx := internalReader .GetLogContext ()
320
+ trace .TopicOnReaderStart (internalReader .Tracer (), & logCtx , internalReader .ID (), consumer , err )
321
+ internalReader .SetLogContext (logCtx )
319
322
320
323
return topicreader .NewReader (internalReader ), nil
321
324
}
@@ -356,15 +359,16 @@ func (c *Client) createWriterConfig(
356
359
topicPath string ,
357
360
opts []topicoptions.WriterOption ,
358
361
) topicwriterinternal.WriterReconnectorConfig {
359
- var connector topicwriterinternal.ConnectFunc = func (ctx context.Context , tracer * trace.Topic ) (
360
- topicwriterinternal.RawTopicWriterStream ,
361
- error ,
362
- ) {
363
- return c .rawClient .StreamWrite (ctx , tracer )
364
- }
362
+ // var connector topicwriterinternal.ConnectFunc = func(ctx context.Context, tracer *trace.Topic) (
363
+ // topicwriterinternal.RawTopicWriterStream,
364
+ // error,
365
+ // ) {
366
+ // return c.rawClient.StreamWrite(ctx, tracer)
367
+ // }
365
368
366
369
options := []topicoptions.WriterOption {
367
- topicwriterinternal .WithConnectFunc (connector ),
370
+ topicwriterinternal .WithRawClient (& c .rawClient ),
371
+ // topicwriterinternal.WithConnectFunc(connector),
368
372
topicwriterinternal .WithTopic (topicPath ),
369
373
topicwriterinternal .WithCommonConfig (c .cfg .Common ),
370
374
topicwriterinternal .WithTrace (c .cfg .Trace ),
0 commit comments