Documentation ¶
Overview ¶
Package otelio implements the instrumentation around the io.Reader and io.Writer.
Index ¶
- func NewInstrumentedReader(prefix string, r io.Reader, ctx context.Context, attrT []attribute.KeyValue, ...) *instrumentedReader
- func NewInstrumentedReaderFactory(prefix string, attrT []attribute.KeyValue, attrM []attribute.KeyValue, ...) func(io.Reader, context.Context) *instrumentedReader
- func NewInstrumentedWriter(prefix string, w io.Writer, ctx context.Context, attrT []attribute.KeyValue, ...) *instrumentedWriter
- func NewInstrumentedWriterFactory(prefix string, attrT []attribute.KeyValue, attrM []attribute.KeyValue, ...) func(io.Writer, context.Context) *instrumentedWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstrumentedReader ¶
func NewInstrumentedReader(prefix string, r io.Reader, ctx context.Context, attrT []attribute.KeyValue, attrM []attribute.KeyValue, tracer trace.Tracer, meter metric.Meter, ) *instrumentedReader
NewInstrumentedReader wraps a reader with an instrumented reader. Is better to use NewInstrumentedReaderFactory.
func NewInstrumentedReaderFactory ¶
func NewInstrumentedReaderFactory(prefix string, attrT []attribute.KeyValue, attrM []attribute.KeyValue, tracer trace.Tracer, meter metric.Meter, ) func(io.Reader, context.Context) *instrumentedReader
NewInstrumentedReaderFactory creates a function that can wrap a reader with an instrumented reader. Is better than the [NewIntrumentedReader] call because the instruments here are only created once.
func NewInstrumentedWriter ¶
func NewInstrumentedWriter(prefix string, w io.Writer, ctx context.Context, attrT []attribute.KeyValue, attrM []attribute.KeyValue, tracer trace.Tracer, meter metric.Meter, ) *instrumentedWriter
NewInstrumentedWriter wraps a writer with an instrumented writer. Is better to use NewInstrumentedWriterFactory.
func NewInstrumentedWriterFactory ¶
func NewInstrumentedWriterFactory(prefix string, attrT []attribute.KeyValue, attrM []attribute.KeyValue, tracer trace.Tracer, meter metric.Meter, ) func(io.Writer, context.Context) *instrumentedWriter
NewInstrumentedWriterFactory creates a function that can wrap a writer with an instrumented writer. Is better than the [NewIntrumentedWriter] call because the instruments here are only created once.
Types ¶
This section is empty.