diagnostics

package
v0.0.0-...-df423d5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(k string, v any) extender

Index annotates spans with filterable, groupable properties. Index values must be of type key, value, or boolean.

func InitCollector

func InitCollector() error

Initialize trace and span collection and emission. Should only be called as an initialization step in the context of a local run (such as load testing). SDK users need not initialize the xray, as they should already be running their own collector.

func Label

func Label(k string, v any) extender

Label tags spans with non-filterable, purely informational data. Label values can be any type.

func Span

func Span(ctx context.Context, name string, ext ...extender) (_ctx context.Context, _fn func())

Adds a Span to the given context. Spans may be extended with indexes for filtering and grouping, or with labels for contextual info. Named variable returns are necessary here to prevent nil responses during panic handling.

func Start

func Start(ctx context.Context, name string) (context.Context, func())

Start kicks off a parent segment for tracking. Start should only be called internally, and only once per corso execution. SDK users may provide contexts with existing segments rather calling Start. The returned context will contain the parent segment (you should only ever have one) for all child spans to collect within; adding a span to any context besides this one (and its descendants) will slice that span from observation. The returned func closes and flushes the parent segment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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