trace

package
v1.85.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, u ID) context.Context

NewContext returns a new Context that carries value u.

Types

type ID

type ID string

ID represents a trace ID propagated between services.

func FromContext

func FromContext(ctx context.Context) (id ID, ok bool)

FromContext returns the ID value stored in ctx, if any.

func FromContextOrNew

func FromContextOrNew(ctx context.Context) (ID, context.Context)

FromContextOrNew returns the ID value stored in ctx. If it fails to do so, it will add a new ID to the context.

func New

func New() ID

New returns a new trace.ID

Jump to

Keyboard shortcuts

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