trace

package
v1.18.6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContextWithMetadata added in v1.18.2

func NewContextWithMetadata(md metadata.M) context.Context

NewContextWithMetadata create new context with metadata for tracer starting. In yomo, we use metadata from dataFrame as the trace Propagator. And yomo only carries traceID and spanID in metadata.

func SetTracerProvider added in v1.18.2

func SetTracerProvider(service string)

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

func ShutdownTracerProvider added in v1.18.2

func ShutdownTracerProvider()

ShutdownTracerProvider shutdown the global TracerProvider.

Types

type Tracer added in v1.18.2

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

Tracer is otel span tracer.

func NewTracer added in v1.18.2

func NewTracer(name string) *Tracer

NewTracer create tracer instance.

func (*Tracer) End added in v1.18.2

func (t *Tracer) End(md metadata.M, span trace.Span, kv ...attribute.KeyValue)

End finish tracing span.

func (*Tracer) Start added in v1.18.2

func (t *Tracer) Start(md metadata.M, operation string) trace.Span

Start start tracing span.

Jump to

Keyboard shortcuts

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