obstest

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package obstest contains the private in-memory observability harness used by this library's tests. It must never be imported by production packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChildOf

func ChildOf(parent, child sdktrace.ReadOnlySpan) bool

Types

type Harness

type Harness struct {
	// contains filtered or unexported fields
}

func New

func New(t testing.TB) *Harness

func (*Harness) CounterValue

func (h *Harness) CounterValue(ctx context.Context, name string, attrs ...attribute.KeyValue) (int64, bool)

func (*Harness) GaugeValue

func (h *Harness) GaugeValue(ctx context.Context, name string, attrs ...attribute.KeyValue) (float64, bool)

func (*Harness) HistogramCount

func (h *Harness) HistogramCount(ctx context.Context, name string, attrs ...attribute.KeyValue) (uint64, bool)

func (*Harness) Logger

func (h *Harness) Logger(scope string) instrument.Logger

func (*Harness) Logs

func (h *Harness) Logs() []sdklog.Record

func (*Harness) LogsBySeverity

func (h *Harness) LogsBySeverity(severity log.Severity) []sdklog.Record

func (*Harness) MeterProvider

func (h *Harness) MeterProvider() metric.MeterProvider

func (*Harness) Propagator

func (h *Harness) Propagator() propagation.TextMapPropagator

func (*Harness) Spans

func (h *Harness) Spans() []sdktrace.ReadOnlySpan

func (*Harness) SpansByName

func (h *Harness) SpansByName(name string) []sdktrace.ReadOnlySpan

func (*Harness) TracerProvider

func (h *Harness) TracerProvider() trace.TracerProvider

Jump to

Keyboard shortcuts

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