trace

package
v0.0.0-...-04c1826 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const TracerKey = "Tracer-context"

Variables

This section is empty.

Functions

func ContextWithSpan

func ContextWithSpan(c *gin.Context) (ctx context.Context, ok bool)

ContextWithSpan 返回context

func ExtraTraceID

func ExtraTraceID(ctx context.Context, key string) string

func Init

func Init(sf int, svcName, addr string)

func NewTracer

func NewTracer(servicename string, addr string) (opentracing.Tracer, io.Closer, error)

NewTracer 创建一个jaeger Tracer

func SetSamplingFrequency

func SetSamplingFrequency(n int)

采样频率

func TracerWrapper

func TracerWrapper(c *gin.Context)

包装context,添加 trace_id

Types

This section is empty.

Jump to

Keyboard shortcuts

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