trace

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachLog

func AttachLog(name, body string)

AttachLog attaches a log with the provided name and body.

func CaptureError

func CaptureError(ctx context.Context, err error) error

CaptureError retrieves the span from the ctx and marks it with the provided err. Returns the same error provided.

func NewSpan

func NewSpan(ctx context.Context, name string) (context.Context, trace.Span)

NewSpan initializes the otel tracer, if necessary, and starts a new span with the provided name. The returned span will be added to the returned context.

func SpanError

func SpanError(span trace.Span, err error) error

SpanError marks the span with the provided err. Returns the same error provided.

Types

type Shutdown

type Shutdown func()

func Init

func Init(ctx context.Context, userId string) ([]Shutdown, error)

Init initializes the otel framework.

Jump to

Keyboard shortcuts

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