Documentation ¶
Overview ¶
Package utils contains util functions for OTel e2e tests
Package utils contains util functions for OTel e2e tests
Index ¶
- func SetupSampleTraces(s OTelTestSuite)
- func TestAPMStats(s OTelTestSuite, numTraces int, computeTopLevelBySpanKind bool)
- func TestCalendarApp(s OTelTestSuite, ust bool)
- func TestHosts(s OTelTestSuite)
- func TestLogs(s OTelTestSuite, iaParams IAParams)
- func TestMetrics(s OTelTestSuite, iaParams IAParams)
- func TestOTelAgentInstalled(s OTelTestSuite)
- func TestOTelFlareExtensionResponse(s OTelTestSuite, providedCfg string, fullCfg string, sources string)
- func TestOTelFlareFiles(s OTelTestSuite)
- func TestOTelRemoteConfigPayload(s OTelTestSuite, providedCfg string, fullCfg string)
- func TestPrometheusMetrics(s OTelTestSuite)
- func TestSampling(s OTelTestSuite, computeTopLevelBySpanKind bool)
- func TestTraces(s OTelTestSuite, iaParams IAParams)
- func TestTracesWithOperationAndResourceName(s OTelTestSuite, clientOperationName string, clientResourceName string, ...)
- func TestTracesWithSpanReceiverV2(s OTelTestSuite)
- type IAParams
- type OTelMetadata
- type OTelTestSuite
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupSampleTraces ¶
func SetupSampleTraces(s OTelTestSuite)
SetupSampleTraces flushes the intake server and starts a telemetrygen job to generate traces
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, ust bool)
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 TestOTelFlareExtensionResponse ¶
func TestOTelFlareExtensionResponse(s OTelTestSuite, providedCfg string, fullCfg string, sources string)
TestOTelFlareExtensionResponse tests that the OTel Agent DD flare extension returns expected responses
func TestOTelFlareFiles ¶
func TestOTelFlareFiles(s OTelTestSuite)
TestOTelFlareFiles tests that the OTel Agent flares contain the expected files
func TestOTelRemoteConfigPayload ¶
func TestOTelRemoteConfigPayload(s OTelTestSuite, providedCfg string, fullCfg string)
TestOTelRemoteConfigPayload tests that the OTel Agent DD flare extension returns expected responses
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
func TestTracesWithOperationAndResourceName ¶
func TestTracesWithOperationAndResourceName( s OTelTestSuite, clientOperationName string, clientResourceName string, serverOperationName string, serverResourceName string, )
TestTracesWithOperationAndResourceName tests that OTLP traces are received through OTel pipelines as expected with updated operation and resource name logic
func TestTracesWithSpanReceiverV2 ¶
func TestTracesWithSpanReceiverV2(s OTelTestSuite)
TestTracesWithSpanReceiverV2 tests that OTLP traces are received through OTel pipelines as expected with updated OTLP span receiver
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 OTelMetadata ¶
type OTelMetadata struct { Command string `json:"command"` Description string `json:"description"` Enabled bool `json:"enabled"` ExtensionVersion string `json:"extension_version"` extension.ConfigResponse }
OTelMetadata represents the inventory otel metadata payload
type OTelTestSuite ¶
type OTelTestSuite interface { T() *testing.T Env() *environments.Kubernetes }
OTelTestSuite is an interface for the OTel e2e test suite.