trace

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderKeyTraceId = "X-Trace-ID"
)

Variables

This section is empty.

Functions

func CopyTraceInfo

func CopyTraceInfo(src context.Context, dst ...context.Context) (ctx context.Context)

CopyTraceInfo from context

func GetTraceId

func GetTraceId(ctx context.Context) string

GetTraceId from context

func Middleware

func Middleware(r *ghttp.Request)

Middleware create trace id if request header not set HeaderKeyTraceId and add trace id to context value, use GetTraceId to get.

Types

This section is empty.

Jump to

Keyboard shortcuts

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