tracing

package
v0.0.0-...-3d0596a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithTraceID

func ContextWithTraceID(ctx context.Context, id string) context.Context

ContextWithTraceID save trace id in context

func Init

func Init(cfg *config.Config) (io.Closer, error)

Init global tracer

func Logger

func Logger(ctx context.Context) *zap.Logger

Logger return logger with trace id

func TraceIDFromContext

func TraceIDFromContext(ctx context.Context) string

TraceIDFromContext extract trace id if span started or empty string otherwise

func WithSpan

func WithSpan(next http.Handler) http.Handler

WithSpan middleware add tracing span to context and it's id in response header

Types

This section is empty.

Jump to

Keyboard shortcuts

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