telemetrytest

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package telemetrytest holds test helpers for fabriq's tracing: a span recorder installed as the global tracer provider, and a scan that proves a value never reached a span.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertNoValue

func AssertNoValue(t testing.TB, rec *tracetest.SpanRecorder, value string)

AssertNoValue fails the test if value appears in any ended span's name, attributes, events, event attributes, links or status description.

func Attr

func Attr(s sdktrace.ReadOnlySpan, key string) (string, bool)

Attr returns the string form of a span attribute and whether it is set.

func Named

Named returns the ended spans called name.

func Record

func Record(t testing.TB) *tracetest.SpanRecorder

Record installs a span recorder as the global tracer provider for the rest of the test and restores the previous provider on cleanup. Tests that call it must not run in parallel with other tests that read the global provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

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