opentracing

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

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Copyright (c) 2018, dmc (814172254@qq.com),

Authors: dmc,

Distribution:.

Copyright (c) 2018, dmc (814172254@qq.com),

Authors: dmc,

Distribution:.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context, name string) opentracing.Span

FromContext 从context中取出span

func ToContext

func ToContext(r *http.Request, span opentracing.Span) *http.Request

ToContext 将span写入request的context中

Types

type Config

type Config struct {
	Provider      string
	JaegerTracing JaegerTracing
}

Config 配置文件

func InitConfig

func InitConfig(url string) Config

type JaegerTracing

type JaegerTracing struct {
	ServiceName string

	SamplingServerURL   string
	SamplingParam       float64
	SamplingType        string
	BufferFlushInterval time.Duration
	LogSpans            bool
	QueueSize           int
	PropagationFormat   string
}

type Tracing

type Tracing struct {
	// contains filtered or unexported fields
}

Tracing tracing的基类

func New

func New(cfg Config) *Tracing

New 按照配置信息初始化tracing

func (*Tracing) Close

func (t *Tracing) Close()

Close 关闭tracer

func (*Tracing) Setup

func (t *Tracing) Setup() (err error)

Setup 根据tracing的属性选择合适的opentracing客户端

Jump to

Keyboard shortcuts

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