gotrace_id

package
v1.0.215 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Nil = "%!s(<nil>)"

Variables

This section is empty.

Functions

func CustomTraceIdContext

func CustomTraceIdContext(ctx context.Context) context.Context

CustomTraceIdContext 自定义设置跟踪编号上下文

func GetGinTraceId

func GetGinTraceId(c *gin.Context) string

GetGinTraceId 通过gin中间件获取跟踪编号

func GetTraceIdContext

func GetTraceIdContext(ctx context.Context) string

GetTraceIdContext 通过上下文获取跟踪编号

func SetCustomTraceId added in v1.0.52

func SetCustomTraceId(ctx context.Context, traceId string) context.Context

SetCustomTraceId 自定义设置跟踪编号上下文

func SetGinTraceId

func SetGinTraceId() gin.HandlerFunc

SetGinTraceId 设置跟踪编号 https://www.jianshu.com/p/2a1a74ad3c3a

func SetGinTraceIdContext

func SetGinTraceIdContext(ctx context.Context, c *gin.Context) context.Context

SetGinTraceIdContext 设置跟踪编号上下文

Types

This section is empty.

Jump to

Keyboard shortcuts

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