utils

package
v0.60.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package utils contains util functions for OTel e2e tests

Package utils contains util functions for OTel e2e tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestAPMStats

func TestAPMStats(s OTelTestSuite, numTraces int, computeTopLevelBySpanKind bool)

TestAPMStats checks that APM stats are received with the correct number of hits per traces given

func TestCalendarApp

func TestCalendarApp(s OTelTestSuite)

TestCalendarApp tests that OTLP metrics are received through OTel pipelines as expected

func TestHosts

func TestHosts(s OTelTestSuite)

TestHosts verifies that OTLP traces, metrics, and logs have consistent hostnames

func TestLogs

func TestLogs(s OTelTestSuite, iaParams IAParams)

TestLogs tests that OTLP logs are received through OTel pipelines as expected

func TestMetrics

func TestMetrics(s OTelTestSuite, iaParams IAParams)

TestMetrics tests that OTLP metrics are received through OTel pipelines as expected

func TestOTelAgentInstalled

func TestOTelAgentInstalled(s OTelTestSuite)

TestOTelAgentInstalled checks that the OTel Agent is installed in the test suite

func TestOTelFlare

func TestOTelFlare(s OTelTestSuite, providedCfg string, fullCfg string, sources string)

TestOTelFlare tests that the OTel Agent flare functionality works as expected

func TestPrometheusMetrics

func TestPrometheusMetrics(s OTelTestSuite)

TestPrometheusMetrics tests that expected prometheus metrics are scraped

func TestSampling

func TestSampling(s OTelTestSuite, computeTopLevelBySpanKind bool)

TestSampling tests that APM stats are correct when using probabilistic sampling

func TestTraces

func TestTraces(s OTelTestSuite, iaParams IAParams)

TestTraces tests that OTLP traces are received through OTel pipelines as expected

Types

type IAParams

type IAParams struct {
	// InfraAttributes indicates whether this test should check for infra attributes
	InfraAttributes bool

	// EKS indicates if this test should check for EKS specific properties
	EKS bool

	// Cardinality represents the tag cardinality used by this test
	Cardinality types.TagCardinality
}

IAParams contains options for different infra attribute testing scenarios

type OTelTestSuite

type OTelTestSuite interface {
	T() *testing.T
	Env() *environments.Kubernetes
}

OTelTestSuite is an interface for the OTel e2e test suite.

Jump to

Keyboard shortcuts

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