MCPcopy Create free account
hub / github.com/DoNewsCode/core / Trace

Function Trace

otkafka/writer.go:32–41  ·  view source on GitHub ↗

Trace takes a kafka.Writer and returns a decorated Writer.

(writer *kafka.Writer, tracer opentracing.Tracer, opts ...WriterOption)

Source from the content-addressed store, hash-verified

30
31// Trace takes a kafka.Writer and returns a decorated Writer.
32func Trace(writer *kafka.Writer, tracer opentracing.Tracer, opts ...WriterOption) *Writer {
33 w := &Writer{
34 Writer: writer,
35 tracer: tracer,
36 }
37 for _, f := range opts {
38 f(w)
39 }
40 return w
41}
42
43// WriteMessages writes a batch of messages to the kafka topic configured on this
44// writer. Each message written has been injected tracing headers. The upstream

Callers 1

TestWriterFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWriterFunction · 0.68