diff --git a/exporter/datasetexporter/config_test.go b/exporter/datasetexporter/config_test.go index efe18a47afec..c5b407276a74 100644 --- a/exporter/datasetexporter/config_test.go +++ b/exporter/datasetexporter/config_test.go @@ -9,9 +9,7 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/exporter/exporterhelper" ) func TestConfigUnmarshalUnknownAttributes(t *testing.T) { @@ -102,49 +100,6 @@ func TestConfigValidate(t *testing.T) { } } -func TestConfigString(t *testing.T) { - config := Config{ - DatasetURL: "https://example.com", - APIKey: "secret", - Debug: true, - BufferSettings: BufferSettings{ - MaxLifetime: 123, - PurgeOlderThan: 567, - GroupBy: []string{"field1", "field2"}, - }, - TracesSettings: TracesSettings{ - exportSettings: exportSettings{ - ExportSeparator: "TTT", - ExportDistinguishingSuffix: "UUU", - }, - }, - LogsSettings: LogsSettings{ - ExportResourceInfo: true, - ExportResourcePrefix: "AAA", - ExportScopeInfo: true, - ExportScopePrefix: "BBB", - DecomposeComplexMessageField: true, - DecomposedComplexMessagePrefix: "EEE", - exportSettings: exportSettings{ - ExportSeparator: "CCC", - ExportDistinguishingSuffix: "DDD", - }, - }, - ServerHostSettings: ServerHostSettings{ - ServerHost: "foo-bar", - UseHostName: false, - }, - BackOffConfig: configretry.NewDefaultBackOffConfig(), - QueueSettings: exporterhelper.NewDefaultQueueConfig(), - TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), - } - - assert.Equal(t, - "DatasetURL: https://example.com; APIKey: [REDACTED] (6); Debug: true; BufferSettings: {MaxLifetime:123ns PurgeOlderThan:567ns GroupBy:[field1 field2] RetryInitialInterval:0s RetryMaxInterval:0s RetryMaxElapsedTime:0s RetryShutdownTimeout:0s MaxParallelOutgoing:0}; LogsSettings: {ExportResourceInfo:true ExportResourcePrefix:AAA ExportScopeInfo:true ExportScopePrefix:BBB DecomposeComplexMessageField:true DecomposedComplexMessagePrefix:EEE exportSettings:{ExportSeparator:CCC ExportDistinguishingSuffix:DDD}}; TracesSettings: {exportSettings:{ExportSeparator:TTT ExportDistinguishingSuffix:UUU}}; ServerHostSettings: {UseHostName:false ServerHost:foo-bar}; BackOffConfig: {Enabled:true InitialInterval:5s RandomizationFactor:0.5 Multiplier:1.5 MaxInterval:30s MaxElapsedTime:5m0s}; QueueSettings: {Enabled:true NumConsumers:10 QueueSize:1000 StorageID:}; TimeoutSettings: {Timeout:5s}", - config.String(), - ) -} - func TestConfigUseProvidedExportResourceInfoValue(t *testing.T) { f := NewFactory() config := f.CreateDefaultConfig().(*Config)