otelio

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package otelio implements the instrumentation around the io.Reader and io.Writer.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL