Documentation ¶
Index ¶
- Constants
- func GetTraceHash(ctx context.Context) (s string)
- func GetTraceID(ctx context.Context) (s string)
- func GetTraceSampled(ctx context.Context) (sampled, ok bool)
- func GetValue(ctx context.Context, k string) (v string, ok bool)
- func SetTraceID(ctx context.Context, id string) context.Context
- func SetTraceSampledFalse(ctx context.Context) context.Context
- func SetTraceSampledTrue(ctx context.Context) context.Context
- func WithValue(ctx context.Context, k, v string) context.Context
Constants ¶
View Source
const ( CtxKeyTraceID = "trace_id" CtxKeyTraceHash = "create_hash" CtxKeyTraceSampled = "trace_sampled" )
context key
Variables ¶
This section is empty.
Functions ¶
func GetTraceHash ¶
func GetTraceID ¶
GetTraceID get trace-id from context return empty if not found
func GetTraceSampled ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.