gentlemantrace

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(tracer opentracing.Tracer, logger trace.Logger, options ...Option) plugin.Plugin

Middleware return middleware which will extract the trace context from headers and starts a new child span. If there's no parent context, it will start a new root span and adds the 'span.missing' tag to the span. It will also add correlation and http related tags, like the http method, status code etc..

func WithContext

func WithContext(ctx context.Context, req *gentleman.Request) *gentleman.Request

WithContext creates a new Request, combining req.Context and stdlib ctx. It will copy gentleman Context values, but also keep the values stored in the stdlib context. The already set deadline/timeout and cancel on the stdlib context will work too.

Types

type Option

type Option func(*settings)

func Trace

func Trace(option trace.Option) (Option, error)

Trace option can be passed to Middleware to handle cases when a parent trace not found. Check the possible options for more information.

Jump to

Keyboard shortcuts

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