tracing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartCustomSpan

func StartCustomSpan(
	ctx context.Context,
	kind trace.SpanKind,
	pkgName, methodName string,
) (context.Context, trace.Span)

StartCustomSpan returns a span from the context.

func StartSpan

func StartSpan(ctx context.Context, pkgName, methodName string) (context.Context, trace.Span)

StartSpan returns a span from the context.

func Tracer

func Tracer(name string) trace.Tracer

Tracer returns a tracer for the given name.

Types

type Config

type Config struct {
	Endpoint       string
	ServiceName    string
	ServiceVersion string
	Environment    string
	// Set this to `false` if you want to disable tracing completely.
	Enabled bool
}

type Provider

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

Provider is a wrapper around the OpenTelemetry tracer provider.

func NewProvider

func NewProvider(config Config) (*Provider, error)

NewProvider creates a new tracing provider.

func (Provider) Shutdown

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

Shutdown shuts down the tracing provider.

Directories

Path Synopsis
transport

Jump to

Keyboard shortcuts

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