Deprecated: use github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing instead.
package tracing
import "github.com/Azure/go-autorest/tracing"
Index ¶
- func EndSpan(ctx context.Context, httpStatusCode int, err error)
- func IsEnabled() bool
- func NewTransport(base *http.Transport) http.RoundTripper
- func Register(t Tracer)
- func StartSpan(ctx context.Context, name string) context.Context
- type Tracer
Functions ¶
func EndSpan ¶
EndSpan ends a previously started span stored in the context. Has no effect if a Tracer has not been registered.
func IsEnabled ¶
func IsEnabled() bool
IsEnabled returns true if a Tracer has been registered.
func NewTransport ¶
func NewTransport(base *http.Transport) http.RoundTripper
NewTransport creates a new instrumenting http.RoundTripper for the registered Tracer. If no Tracer has been registered it returns nil.
func Register ¶
func Register(t Tracer)
Register will register the provided Tracer. Pass nil to unregister a Tracer.
func StartSpan ¶
StartSpan starts a trace span with the specified name, associating it with the provided context. Has no effect if a Tracer has not been registered.
Types ¶
type Tracer ¶
type Tracer interface {
NewTransport(base *http.Transport) http.RoundTripper
StartSpan(ctx context.Context, name string) context.Context
EndSpan(ctx context.Context, httpStatusCode int, err error)
}
Tracer represents an HTTP tracing facility.
Source Files ¶
- Version
- v0.5.0
- Published
- Aug 15, 2019
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 5 hours ago –
Tools for package owners.