trace

package
v0.0.0-...-1225d9a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestIDHeaderKey 补充的RequestID Header Key
	RequestIDHeaderKey = "X-Request-Id"
	// DefaultComponentName 默认组件名称
	DefaultComponentName = "mcube.server.trace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerInfo

type PeerInfo struct {
	Service  string
	Address  string
	Port     uint16
	Hostname string
}

PeerInfo 端的信息

type Tracer

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

Tracer 链路追踪器

func New

func New(tr opentracing.Tracer, peer PeerInfo) *Tracer

New 实例

func (*Tracer) Debug

func (h *Tracer) Debug(on bool)

Debug 是否开启debug

func (*Tracer) Handler

func (h *Tracer) Handler(next http.Handler) http.Handler

Handler todo

func (*Tracer) SetLogger

func (h *Tracer) SetLogger(l *zerolog.Logger)

SetLogger 设置Logger

Jump to

Keyboard shortcuts

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