trace

package
v0.0.0-...-e38db06 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOpContext

func CreateOpContext(ctx context.Context, traceID string) context.Context

CreateOpContext creates an operation context with correlation data

func GetTraceIDFromContext

func GetTraceIDFromContext(ctx context.Context) string

GetTraceIDFromContext retrieves the trace ID from the operation context

Types

type ContextKey

type ContextKey string

ContextKey wraps scalar string for use in context (to avoid naming collisions)

const TraceIDContextKey ContextKey = "trace_id"

TraceIDContextKey defines the context key used for tracking operation trace ID

func (ContextKey) String

func (c ContextKey) String() string

String implements the Stringer interface for print statements

type Correlation

type Correlation struct {
	Header  map[string][]string
	TraceID ContextKey // TODO: consider uuid.UUID
}

Correlation

Jump to

Keyboard shortcuts

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