Documentation ¶
Index ¶
- type XTraceClient
- func (t *XTraceClient) ToTraceContext(uCtx iris.Context) *context.Context
- func (t *XTraceClient) TraceIdFromContext(pCtx *context.Context) string
- func (t *XTraceClient) TraceTimePoint(pCtx *context.Context, eventName string)
- func (t *XTraceClient) TraceTimePrint(pCtx *context.Context) string
- func (t *XTraceClient) UserIdFromContext(pCtx *context.Context) uint
- type XTraceInfo
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
Click to show internal directories.
Click to hide internal directories.