-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OTEL-2125] Add E2E test for no dd exporter case
- Loading branch information
Showing
8 changed files
with
236 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/new-e2e/tests/otel/otel-agent/config/no-dd-exporter.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:4318 | ||
|
||
exporters: | ||
debug: | ||
verbosity: detailed | ||
|
||
service: | ||
pipelines: | ||
metrics: | ||
receivers: [otlp] | ||
exporters: [debug] | ||
traces: | ||
receivers: [otlp] | ||
exporters: [debug] | ||
logs: | ||
receivers: [otlp] | ||
exporters: [debug] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-present Datadog, Inc. | ||
|
||
// Package otelagent contains e2e otel agent tests | ||
package otelagent | ||
|
||
import ( | ||
_ "embed" | ||
"testing" | ||
|
||
"github.com/DataDog/test-infra-definitions/components/datadog/kubernetesagentparams" | ||
|
||
"github.com/DataDog/datadog-agent/test/new-e2e/pkg/e2e" | ||
"github.com/DataDog/datadog-agent/test/new-e2e/pkg/environments" | ||
awskubernetes "github.com/DataDog/datadog-agent/test/new-e2e/pkg/environments/aws/kubernetes" | ||
"github.com/DataDog/datadog-agent/test/new-e2e/tests/otel/utils" | ||
) | ||
|
||
type noDDExporterTestSuite struct { | ||
e2e.BaseSuite[environments.Kubernetes] | ||
} | ||
|
||
//go:embed config/no-dd-exporter.yml | ||
var noDDExporterConfig string | ||
|
||
//go:embed testdata/no-dd-exporter-provided-config.yml | ||
var noDDExporterProvidedConfig string | ||
|
||
//go:embed testdata/no-dd-exporter-full-config.yml | ||
var noDDExporterFullConfig string | ||
|
||
func TestOTelAgentWithNoDDExporter(t *testing.T) { | ||
values := ` | ||
datadog: | ||
logs: | ||
containerCollectAll: false | ||
containerCollectUsingFiles: false | ||
` | ||
t.Parallel() | ||
e2e.Run(t, &noDDExporterTestSuite{}, | ||
e2e.WithProvisioner( | ||
awskubernetes.KindProvisioner( | ||
awskubernetes.WithAgentOptions( | ||
kubernetesagentparams.WithoutDualShipping(), | ||
kubernetesagentparams.WithHelmValues(values), | ||
kubernetesagentparams.WithOTelAgent(), | ||
kubernetesagentparams.WithOTelConfig(noDDExporterConfig), | ||
)))) | ||
} | ||
|
||
func (s *noDDExporterTestSuite) TestOTelAgentInstalled() { | ||
utils.TestOTelAgentInstalled(s) | ||
} | ||
|
||
func (s *noDDExporterTestSuite) TestFlare() { | ||
utils.TestOTelFlare(s, noDDExporterProvidedConfig, noDDExporterFullConfig, sources) | ||
} |
93 changes: 93 additions & 0 deletions
93
test/new-e2e/tests/otel/otel-agent/testdata/no-dd-exporter-full-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
connectors: {} | ||
exporters: | ||
debug: | ||
sampling_initial: 2 | ||
sampling_thereafter: 1 | ||
use_internal_logger: true | ||
verbosity: Detailed | ||
extensions: | ||
ddflare/dd-autoconfigured: | ||
auth: null | ||
compression_algorithms: [] | ||
cors: null | ||
endpoint: localhost:7777 | ||
include_metadata: false | ||
max_request_body_size: 0 | ||
response_headers: {} | ||
tls: null | ||
health_check/dd-autoconfigured: | ||
auth: null | ||
check_collector_pipeline: | ||
enabled: false | ||
exporter_failure_threshold: 5 | ||
interval: 5m | ||
compression_algorithms: [] | ||
cors: null | ||
endpoint: localhost:13133 | ||
include_metadata: false | ||
max_request_body_size: 0 | ||
path: / | ||
response_body: null | ||
response_headers: {} | ||
tls: null | ||
pprof/dd-autoconfigured: | ||
block_profile_fraction: 0 | ||
dialer: | ||
timeout: 0s | ||
endpoint: localhost:1777 | ||
mutex_profile_fraction: 0 | ||
save_to_file: "" | ||
zpages/dd-autoconfigured: | ||
auth: null | ||
compression_algorithms: [] | ||
cors: null | ||
endpoint: localhost:55679 | ||
include_metadata: false | ||
max_request_body_size: 0 | ||
response_headers: {} | ||
tls: null | ||
processors: {} | ||
receivers: | ||
hostmetrics: | ||
collection_interval: 1m0s | ||
initial_delay: 1s | ||
root_path: "" | ||
timeout: 0s | ||
service: | ||
extensions: | ||
- pprof/dd-autoconfigured | ||
- zpages/dd-autoconfigured | ||
- health_check/dd-autoconfigured | ||
- ddflare/dd-autoconfigured | ||
pipelines: | ||
metrics/sys: | ||
exporters: | ||
- debug | ||
processors: [] | ||
receivers: | ||
- hostmetrics | ||
telemetry: | ||
logs: | ||
development: false | ||
disable_caller: false | ||
disable_stacktrace: false | ||
encoding: console | ||
error_output_paths: | ||
- stderr | ||
initial_fields: {} | ||
level: info | ||
output_paths: | ||
- stderr | ||
sampling: | ||
enabled: true | ||
initial: 10 | ||
thereafter: 100 | ||
tick: 10s | ||
metrics: | ||
address: :8888 | ||
level: Normal | ||
readers: [] | ||
resource: {} | ||
traces: | ||
processors: [] | ||
propagators: [] |
49 changes: 49 additions & 0 deletions
49
test/new-e2e/tests/otel/otel-agent/testdata/no-dd-exporter-provided-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
connectors: {} | ||
exporters: | ||
debug: | ||
sampling_initial: 2 | ||
sampling_thereafter: 1 | ||
use_internal_logger: true | ||
verbosity: Detailed | ||
extensions: {} | ||
processors: {} | ||
receivers: | ||
hostmetrics: | ||
collection_interval: 1m0s | ||
initial_delay: 1s | ||
root_path: "" | ||
timeout: 0s | ||
service: | ||
extensions: [] | ||
pipelines: | ||
metrics/sys: | ||
exporters: | ||
- debug | ||
processors: [] | ||
receivers: | ||
- hostmetrics | ||
telemetry: | ||
logs: | ||
development: false | ||
disable_caller: false | ||
disable_stacktrace: false | ||
encoding: console | ||
error_output_paths: | ||
- stderr | ||
initial_fields: {} | ||
level: info | ||
output_paths: | ||
- stderr | ||
sampling: | ||
enabled: true | ||
initial: 10 | ||
thereafter: 100 | ||
tick: 10s | ||
metrics: | ||
address: :8888 | ||
level: Normal | ||
readers: [] | ||
resource: {} | ||
traces: | ||
processors: [] | ||
propagators: [] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters