tracer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KtbsTracer *tracer

Functions

This section is empty.

Types

type Option

type Option struct {
	Service           Service
	Enable            bool
	TraceProviderURL  string
	TraceProviderPort string
}

type Service

type Service struct {
	Name        string
	Version     string
	Environment string
}

type Span

type Span interface {
	Start(ctx context.Context, opName string) (context.Context, Span)
	Finish(addTags ...map[string]interface{})
	Context() context.Context
	AddError(err error)
	AddAttr(k string, v interface{})
	AddLog(logName string, opts map[string]interface{})
	InjectHTTPClientHeader(ctx context.Context, header http.Header)
	ExtractHTTPClientHeader(ctx context.Context, header http.Header) context.Context
}

type TraceProvider

type TraceProvider struct {
	JaegerProvider *tracesdk.TracerProvider
}

type Tracer

type Tracer interface {
	Trace() Span
}

func New

func New(op Option) Tracer

Jump to

Keyboard shortcuts

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