tracing

package
v4.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndSpan

func EndSpan(span trace.Span, err error)

EndSpan is a utility to simplify ending a span and recording an error.

func RecordError

func RecordError(span trace.Span, err error)

RecordError is a utility to simplify recording an error to the OpenTelemetry span and setting the error status code.

Types

type Exporter

type Exporter string

Exporter is the the name of the exporter to use.

const (
	JaegerExporter   Exporter = "jaeger"
	LogExporter      Exporter = "log"
	OTLPExporter     Exporter = "otlp"
	DisabledExporter Exporter = "disabled"
)

type Shutdown

type Shutdown func(context.Context)

func Provider

func Provider(ctx context.Context, component component.Info) (shutdown Shutdown, err error)

Provider returns an OpenTelemetry TracerProvider configured to use the Jaeger exporter that will send spans to the provided url. The returned TracerProvider will also use a Resource configured with all the information about the application.

Jump to

Keyboard shortcuts

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