tracer

package
v0.0.0-...-50a15a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithSpan

func ContextWithSpan(c context.Context, span trace.Span) context.Context

func GetPropagation

func GetPropagation() propagation.TextMapPropagator

func GetTracer

func GetTracer() trace.Tracer

func GetTracerProvider

func GetTracerProvider() trace.TracerProvider

func NewHttpClient

func NewHttpClient(rt http.RoundTripper) *http.Client

func SetHttpClient

func SetHttpClient(ctx context.Context) context.Context

func SpanFromContext

func SpanFromContext(ctx context.Context) trace.Span

func Start

func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

func TransportWrapper

func TransportWrapper(rt http.RoundTripper) http.RoundTripper

Types

type ExporterName

type ExporterName int
const (
	ExporterNone ExporterName = iota
	ExporterJaeger
	ExporterJSON
)

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithExporter

func WithExporter(name ExporterName) Option

func WithFileName

func WithFileName(name string) Option

func WithWriter

func WithWriter(w io.Writer) Option

type Service

type Service struct {
	Name    string
	Version string
}

type Tracer

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

func InitOpenTelemetry

func InitOpenTelemetry(ctx context.Context, instrumentationName string, options ...Option) (*Tracer, error)

func InitOpenTelemetryWithService

func InitOpenTelemetryWithService(ctx context.Context, instrumentationName string, service Service, options ...Option) (*Tracer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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