tracing

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Tracing tools.

Files starting with "labkit_" were copied from https://gitlab.com/gitlab-org/labkit/-/merge_requests/66 to allow to inject opentracing.Tracer. See the discussion there for the background on why.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructTracer

func ConstructTracer(serviceName, connectionString string) (opentracing.Tracer, io.Closer, error)

ConstructTracer relies on LabKit for tracing implementations.

func NewRoundTripper

func NewRoundTripper(delegate http.RoundTripper, opts ...RoundTripperOption) http.RoundTripper

NewRoundTripper acts as a "client-middleware" for outbound http requests adding instrumentation to the outbound request and then delegating to the underlying transport

Types

type OperationNamer

type OperationNamer func(*http.Request) string

OperationNamer will return an operation name given an HTTP request

type RoundTripperOption

type RoundTripperOption func(*roundTripperConfig)

RoundTripperOption will configure a correlation handler

func WithLogger

func WithLogger(log *zap.Logger) RoundTripperOption

WithLogger sets the log to use.

func WithRoundTripperTracer

func WithRoundTripperTracer(tracer opentracing.Tracer) RoundTripperOption

WithRoundTripperTracer sets a custom tracer to be used for this middleware, otherwise the opentracing.GlobalTracer is used.

Jump to

Keyboard shortcuts

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