utilotel

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownExportMode = errors.New("unknown export mode")

Functions

func AppendNetPeerConnAttributes added in v0.0.3

func AppendNetPeerConnAttributes(attrs []attribute.KeyValue, hostPort string) []attribute.KeyValue

AppendNetPeerConnAttributes append network peer attributes for connection. The appended attributes conforming to the "network.peer.address" and "network.peer.port" semantic conventions.

Types

type ExportMode

type ExportMode int
const (
	ExportModeNoop ExportMode = iota
	ExportModeSTDOUT
	ExportModeOTLPgRPC
)

type HTTPRequestSpanBuilder added in v0.0.2

type HTTPRequestSpanBuilder struct {
	Tracer     trace.Tracer
	Propagator propagation.TextMapPropagator
}

func (*HTTPRequestSpanBuilder) Init added in v0.0.2

func (b *HTTPRequestSpanBuilder) Init(tracer trace.Tracer, propagator propagation.TextMapPropagator)

func (*HTTPRequestSpanBuilder) Start added in v0.0.2

type SwitchableTraceExporter

type SwitchableTraceExporter struct {
	// contains filtered or unexported fields
}

func NewSwitchableTraceExporter

func NewSwitchableTraceExporter(
	ctx context.Context,
	stdoutOpts []stdouttrace.Option,
	otlpGRPCOpts []otlptracegrpc.Option) (traceExporter *SwitchableTraceExporter, err error)

func (*SwitchableTraceExporter) ExportSpans

func (x *SwitchableTraceExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) (err error)

func (*SwitchableTraceExporter) SetMode

func (x *SwitchableTraceExporter) SetMode(ctx context.Context, mode ExportMode) (err error)

func (*SwitchableTraceExporter) Shutdown

func (x *SwitchableTraceExporter) Shutdown(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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