diagnostics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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