xtrace

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XTraceClient added in v0.0.4

type XTraceClient struct {
	ContextKeyTrace     string
	HeaderKeyTraceId    string
	HeaderKeyTs         string
	HeaderKeyAuthUserId string
}

func GenXTraceClient added in v0.0.4

func GenXTraceClient(keyTrace string, headerKeyTraceId string, headerKeyTs string, headerKeyAuthUserId string) XTraceClient

func (*XTraceClient) ToTraceContext added in v0.0.4

func (t *XTraceClient) ToTraceContext(uCtx iris.Context) *context.Context

* 获取一个带TraceInfo的Context环境变量

func (*XTraceClient) TraceIdFromContext added in v0.0.4

func (t *XTraceClient) TraceIdFromContext(pCtx *context.Context) string

* * 从Context环境变量中获取traceId

func (*XTraceClient) TraceTimePoint added in v0.0.4

func (t *XTraceClient) TraceTimePoint(pCtx *context.Context, eventName string)

* 时间统计插入点 uCtx 环境 eventName 事件名称或者步骤名称

func (*XTraceClient) TraceTimePrint added in v0.0.4

func (t *XTraceClient) TraceTimePrint(pCtx *context.Context) string

* 时间统计打印信息 uCtx 环境

func (*XTraceClient) UserIdFromContext added in v0.0.4

func (t *XTraceClient) UserIdFromContext(pCtx *context.Context) uint

* * 从Context环境变量中获取userId

type XTraceInfo

type XTraceInfo struct {
	TraceId string
	TsArr   []int64
	Events  []string
	UserId  uint
}

Jump to

Keyboard shortcuts

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