telemetrytest

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package telemetrytest holds runner-independent conformance cases for telemetry.TelemetryContext adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelemetryAdapterConformanceCase

type TelemetryAdapterConformanceCase struct {
	Group string
	Name  string
	Run   func(context.Context) error
}

TelemetryAdapterConformanceCase is a runner-independent conformance case that can be registered with any test framework. Run returns the first failed check.

func CreateTelemetryAdapterConformance

func CreateTelemetryAdapterConformance(factory TelemetryAdapterFixtureFactory) []TelemetryAdapterConformanceCase

CreateTelemetryAdapterConformance creates runner-independent cases for the callback telemetry adapter contract.

type TelemetryAdapterFixture

type TelemetryAdapterFixture struct {
	Context     telemetry.TelemetryContext
	Propagation telemetry.TelemetryPropagation
	Metrics     telemetry.TelemetryMetrics
	GetMetrics  func(context.Context) ([]telemetry.RecordedTelemetryMeasurement, error)
	GetSpans    func(context.Context) ([]telemetry.RecordedTelemetrySpan, error)
	Dispose     func(context.Context) error
}

TelemetryAdapterFixture is a fresh adapter instance and normalized snapshot reader owned by one conformance case. Propagation and Metrics are the adapter's optional capabilities: a nil one skips its cases. A fixture with Metrics supplies GetMetrics, its normalized measurement reader. Dispose ports Symbol.asyncDispose; a nil Dispose releases nothing.

type TelemetryAdapterFixtureFactory

type TelemetryAdapterFixtureFactory func(context.Context) (TelemetryAdapterFixture, error)

TelemetryAdapterFixtureFactory creates an isolated adapter fixture for one conformance case.

Jump to

Keyboard shortcuts

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