trace

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider represents the tracer provider. Depending on the `config.Disabled` parameter, it will either use a "live" provider or a "no operations" version. The "no operations" means, tracing will be globally disabled.

func NewProvider

func NewProvider(config ProviderConfig) (Provider, error)

New returns a new `Provider` type. It uses Jaeger exporter and globally sets the tracer provider as well as the global tracer for spans.

func (Provider) Close

func (p Provider) Close(ctx context.Context) error

Close shuts down the tracer provider only if it was not "no operations" version.

type ProviderConfig

type ProviderConfig struct {
	JaegerEndpoint string
	ServiceName    string
	ServiceVersion string
	Environment    string
}

ProviderConfig represents the provider configuration and used to create a new `Provider` type.

type TraceService

type TraceService interface {
	AddSpanTags(span trace.Span, tags map[string]string)
	AddSpanEvents(span trace.Span, name string, events map[string]string)
	AddSpanError(span trace.Span, err error)
	FailSpan(span trace.Span, msg string)
}

func NewTraceService

func NewTraceService() TraceService

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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