tracing

package
v11.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Transport is the default tracing RoundTripper. The custom options setter will control
	// if traces are being emitted or not.
	Transport = &ochttp.Transport{
		Propagation:     &tracecontext.HTTPFormat{},
		GetStartOptions: getStartOptions,
	}
)

Functions

func Disable

func Disable()

Disable will disable instrumentation for metrics and traces.

func Enable

func Enable() error

Enable will start instrumentation for metrics and traces.

func EnableWithAIForwarding

func EnableWithAIForwarding(agentEndpoint string) (err error)

EnableWithAIForwarding will start instrumentation and will connect to app insights forwarder exporter making the metrics and traces available in app insights.

func EndSpan

func EndSpan(ctx context.Context, httpStatusCode int, err error)

EndSpan ends a previously started span stored in the context

func IsEnabled

func IsEnabled() bool

IsEnabled returns true if monitoring is enabled for the sdk.

func StartSpan

func StartSpan(ctx context.Context, name string) context.Context

StartSpan starts a trace span

Types

This section is empty.

Jump to

Keyboard shortcuts

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