telemetrytest

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package telemetrytest provides test doubles for the telemetry package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecordedEvent

type RecordedEvent struct {
	Name       string
	Properties map[string]any
}

RecordedEvent is one event captured by a RecordingClient.

type RecordingClient

type RecordingClient struct {
	Events     []RecordedEvent
	Identifies int
	// contains filtered or unexported fields
}

RecordingClient is a telemetry.TelemetryClient that records the tracked events so tests can assert on their names, properties and order.

func (*RecordingClient) Close

func (r *RecordingClient) Close()

func (*RecordingClient) Identify

func (r *RecordingClient) Identify(ctx context.Context) error

func (*RecordingClient) Track

func (r *RecordingClient) Track(
	ctx context.Context,
	event string,
	properties map[string]any,
) error

Jump to

Keyboard shortcuts

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