xtrace

package
v0.0.3 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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToTraceContext

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

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

func TraceIdFromContext

func TraceIdFromContext(pCtx *context.Context) string

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

func TraceTimePoint

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

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

func TraceTimePrint

func TraceTimePrint(pCtx *context.Context) string

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

func UserIdFromContext

func UserIdFromContext(pCtx *context.Context) uint

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

Types

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