otel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseSpan

func CloseSpan(span trace.Span, err error)

CloseSpan closes a span and records the given error if not nil. If the span is nil, this is a noop.

func StartSpan

func StartSpan(ctx context.Context, tracer trace.Tracer, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

StartSpan will start a span using the tracer on input. If the tracer is nil, the context returned is the same as on input, and the span will be nil.

Types

type Instrumentation

type Instrumentation struct {
	Meter  metric.Meter
	Tracer trace.Tracer
}

func (*Instrumentation) IsEnabled

func (i *Instrumentation) IsEnabled() bool

Jump to

Keyboard shortcuts

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