tracing

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &http.Client{
	Transport: DefaultTransport,
}
View Source
var DefaultTransport http.RoundTripper = &Transport{
	RoundTripper: &nethttp.Transport{RoundTripper: http.DefaultTransport},
}

Functions

func ContextWithSpanFromContext

func ContextWithSpanFromContext(ctx, ctx2 context.Context) context.Context

ContextWithSpanFromContext sets the tracing span of a context from other context if one is not already set. Alternative would be context.WithoutCancel() that would copy the context but reset ctx.Done

func FinishWithError

func FinishWithError(span opentracing.Span, err error)

FinishWithError finalizes the span and sets the error if one is passed

func StartSpan

func StartSpan(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)

StartSpan starts a new span as a child of the span in context. If there is no span in context then this is a no-op. The difference from opentracing.StartSpanFromContext is that this method does not depend on global tracer.

Types

type MultiSpan

type MultiSpan struct {
	opentracing.Span
}

func NewMultiSpan

func NewMultiSpan() *MultiSpan

func (*MultiSpan) Add

func (ms *MultiSpan) Add(s opentracing.Span)

type Transport

type Transport struct {
	http.RoundTripper
}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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