tracing

package
v0.0.0-...-94892f2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractHeaders

func ExtractHeaders(ctx context.Context, headers map[string]interface{}) context.Context

ExtractHeaders extracts the tracing info from the header and puts it into the context

func ExtractTraceID

func ExtractTraceID(span trace.Span) (string, bool)

func InjectHeaders

func InjectHeaders(ctx context.Context) map[string]interface{}

InjectHeaders injects the tracing info from the context into a new header map

func RecordAnyErrorAndEndSpan

func RecordAnyErrorAndEndSpan(err error, span trace.Span)

Types

type CleanupFunc

type CleanupFunc func()

func Init

func Init(ctx context.Context, logger *slog.Logger, serviceName, serviceVersion string) (CleanupFunc, error)

Jump to

Keyboard shortcuts

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