v0.0.0-...-261bb52 Latest Latest

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 20 Imported by: 0




This section is empty.


This section is empty.


func Init

func Init(serviceName string, metricsFactory metrics.Factory) (opentracing.Tracer, io.Closer)

Init creates a new instance of Jaeger tracer.

func WrapRedisClient

func WrapRedisClient(ctx context.Context, client *redis.Client) *redis.Client

WrapRedisClient adds opentracing measurements for commands and returns cloned client


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