metadata

package
v0.2.4-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CtxKeyTraceID      = "trace_id"
	CtxKeyTraceHash    = "create_hash"
	CtxKeyTraceSampled = "trace_sampled"
)

context key

Variables

This section is empty.

Functions

func GetTraceHash

func GetTraceHash(ctx context.Context) (s string)

func GetTraceID

func GetTraceID(ctx context.Context) (s string)

GetTraceID get trace-id from context return empty if not found

func GetTraceSampled

func GetTraceSampled(ctx context.Context) (sampled, ok bool)

func GetValue

func GetValue(ctx context.Context, k string) (v string, ok bool)

func SetTraceID

func SetTraceID(ctx context.Context, id string) context.Context

func SetTraceSampledFalse

func SetTraceSampledFalse(ctx context.Context) context.Context

func SetTraceSampledTrue

func SetTraceSampledTrue(ctx context.Context) context.Context

func WithValue

func WithValue(ctx context.Context, k, v string) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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