tracing – github.com/Azure/go-autorest/tracing Index | Files
Deprecated: use github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing instead.

package tracing

import "github.com/Azure/go-autorest/tracing"

Index

Variables

var (
	// Transport is the default tracing RoundTripper. The custom options setter will control
	// if traces are being emitted or not.
	Transport = NewTransport()
)

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 NewTransport

func NewTransport() *ochttp.Transport

NewTransport returns a new instance of a tracing-aware RoundTripper.

func StartSpan

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

StartSpan starts a trace span

Source Files

tracing.go

Version
v0.2.0
Published
Aug 1, 2019
Platform
windows/amd64
Imports
9 packages
Last checked
5 hours ago

Tools for package owners.