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 ¶
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 ¶
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.