tracing

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(serviceName string, metricsFactory metrics.Factory, logger log.Factory) opentracing.Tracer

Init creates a new instance of Jaeger tracer.

Types

type HTTPClient

type HTTPClient struct {
	Tracer opentracing.Tracer
	Client *http.Client
}

HTTPClient wraps an http.Client with tracing instrumentation.

func (*HTTPClient) GetJSON

func (c *HTTPClient) GetJSON(ctx context.Context, endpoint string, url string, out interface{}) error

GetJSON executes HTTP GET against specified url and tried to parse the response into out object.

type Mutex

type Mutex struct {
	SessionBaggageKey string
	// contains filtered or unexported fields
}

Mutex is just like the standard sync.Mutex, except that it is aware of the Context and logs some diagnostic information into the current span.

func (*Mutex) Lock

func (sm *Mutex) Lock(ctx context.Context)

Lock acquires an exclusive lock.

func (*Mutex) Unlock

func (sm *Mutex) Unlock()

Unlock releases the lock.

type TracedServeMux

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

TracedServeMux is a wrapper around http.ServeMux that instruments handlers for tracing.

func NewServeMux

func NewServeMux(tracer opentracing.Tracer) *TracedServeMux

NewServeMux creates a new TracedServeMux.

func (*TracedServeMux) Handle

func (tm *TracedServeMux) Handle(pattern string, handler http.Handler)

Handle implements http.ServeMux#Handle

func (*TracedServeMux) ServeHTTP

func (tm *TracedServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.ServeMux#ServeHTTP

Jump to

Keyboard shortcuts

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