tracing

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Traced

func Traced(options ...Option) middlewares.Middleware

Traced is a middleware that adds OpenTracing spans to the current request context and sets some sane span tags

Types

type Option

type Option func(*options)

Option represents a logger option.

func WithBaggage

func WithBaggage(name stringBaggageName, value string) Option

WithBaggage will set custom baggage to the span created by middleware

func WithLogs

func WithLogs(name stringLogName, value string) Option

WithLogs will add custom log to the span create by middleware

func WithName

func WithName(name string) Option

WithName will define a handler name (used in span operation name) for the span created by the middleware Default is derived from the function name if http.Handler being wrapped

func WithNamePrefix

func WithNamePrefix(prefix string) Option

WithNamePrefix will define prefix for a operation name that is being created by middleware

func WithTags

func WithTags(name stringTagName, value string) Option

WithTags will add custom tags tp the span create by middleware

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

WithTracer adds list of headers that should be added to the logger

Jump to

Keyboard shortcuts

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