|
9 | 9 | "time"
|
10 | 10 |
|
11 | 11 | "github.com/stretchr/testify/assert"
|
12 |
| - "go.opentelemetry.io/collector/config/configretry" |
13 | 12 | "go.opentelemetry.io/collector/confmap"
|
14 |
| - "go.opentelemetry.io/collector/exporter/exporterhelper" |
15 | 13 | )
|
16 | 14 |
|
17 | 15 | func TestConfigUnmarshalUnknownAttributes(t *testing.T) {
|
@@ -102,49 +100,6 @@ func TestConfigValidate(t *testing.T) {
|
102 | 100 | }
|
103 | 101 | }
|
104 | 102 |
|
105 |
| -func TestConfigString(t *testing.T) { |
106 |
| - config := Config{ |
107 |
| - DatasetURL: "https://example.com", |
108 |
| - APIKey: "secret", |
109 |
| - Debug: true, |
110 |
| - BufferSettings: BufferSettings{ |
111 |
| - MaxLifetime: 123, |
112 |
| - PurgeOlderThan: 567, |
113 |
| - GroupBy: []string{"field1", "field2"}, |
114 |
| - }, |
115 |
| - TracesSettings: TracesSettings{ |
116 |
| - exportSettings: exportSettings{ |
117 |
| - ExportSeparator: "TTT", |
118 |
| - ExportDistinguishingSuffix: "UUU", |
119 |
| - }, |
120 |
| - }, |
121 |
| - LogsSettings: LogsSettings{ |
122 |
| - ExportResourceInfo: true, |
123 |
| - ExportResourcePrefix: "AAA", |
124 |
| - ExportScopeInfo: true, |
125 |
| - ExportScopePrefix: "BBB", |
126 |
| - DecomposeComplexMessageField: true, |
127 |
| - DecomposedComplexMessagePrefix: "EEE", |
128 |
| - exportSettings: exportSettings{ |
129 |
| - ExportSeparator: "CCC", |
130 |
| - ExportDistinguishingSuffix: "DDD", |
131 |
| - }, |
132 |
| - }, |
133 |
| - ServerHostSettings: ServerHostSettings{ |
134 |
| - ServerHost: "foo-bar", |
135 |
| - UseHostName: false, |
136 |
| - }, |
137 |
| - BackOffConfig: configretry.NewDefaultBackOffConfig(), |
138 |
| - QueueSettings: exporterhelper.NewDefaultQueueConfig(), |
139 |
| - TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), |
140 |
| - } |
141 |
| - |
142 |
| - assert.Equal(t, |
143 |
| - "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:<nil>}; TimeoutSettings: {Timeout:5s}", |
144 |
| - config.String(), |
145 |
| - ) |
146 |
| -} |
147 |
| - |
148 | 103 | func TestConfigUseProvidedExportResourceInfoValue(t *testing.T) {
|
149 | 104 | f := NewFactory()
|
150 | 105 | config := f.CreateDefaultConfig().(*Config)
|
|
0 commit comments