File tree Expand file tree Collapse file tree 7 files changed +18
-1
lines changed Expand file tree Collapse file tree 7 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,7 @@ func TestCollector_ProcessResourceUpdateTopicFails(t *testing.T) {
405
405
conf .Collector .Processors .Batch = nil
406
406
conf .Collector .Processors .Attribute = nil
407
407
conf .Collector .Processors .Resource = nil
408
+ conf .Collector .Processors .LogsGzip = nil
408
409
conf .Collector .Exporters .OtlpExporters = nil
409
410
conf .Collector .Exporters .PrometheusExporter = & config.PrometheusExporter {
410
411
Server : & config.ServerConfig {
@@ -457,6 +458,7 @@ func TestCollector_ProcessResourceUpdateTopicFails(t *testing.T) {
457
458
Batch : nil ,
458
459
Attribute : nil ,
459
460
Resource : nil ,
461
+ LogsGzip : nil ,
460
462
},
461
463
collector .config .Collector .Processors )
462
464
})
@@ -727,7 +729,7 @@ func TestCollector_updateTcplogReceivers(t *testing.T) {
727
729
conf .Collector .Processors .Batch = nil
728
730
conf .Collector .Processors .Attribute = nil
729
731
conf .Collector .Processors .Resource = nil
730
-
732
+ conf . Collector . Processors . LogsGzip = nil
731
733
collector , err := New (conf )
732
734
require .NoError (t , err )
733
735
Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ processors:
143
143
timeout: {{ .Processors.Batch.Timeout }}
144
144
send_batch_max_size: {{ .Processors.Batch.SendBatchMaxSize }}
145
145
{{- end }}
146
+ {{- if ne .Processors.LogsGzip nil }}
147
+ logsgzip: {}
148
+ {{- end }}
146
149
147
150
exporters:
148
151
{{- range $index, $otlpExporter := .Exporters.OtlpExporters }}
@@ -294,6 +297,9 @@ service:
294
297
- resource
295
298
{{- end }}
296
299
{{- end }}
300
+ {{- if ne .Processors.LogsGzip nil }}
301
+ - logsgzip
302
+ {{- end }}
297
303
{{- if ne .Processors.Batch nil }}
298
304
- batch
299
305
{{- end }}
Original file line number Diff line number Diff line change @@ -823,6 +823,7 @@ func resolveProcessors() Processors {
823
823
SendBatchMaxSize : viperInstance .GetUint32 (CollectorBatchProcessorSendBatchMaxSizeKey ),
824
824
Timeout : viperInstance .GetDuration (CollectorBatchProcessorTimeoutKey ),
825
825
},
826
+ LogsGzip : & LogsGzip {},
826
827
}
827
828
828
829
if viperInstance .IsSet (CollectorAttributeProcessorKey ) {
Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ func TestResolveCollector(t *testing.T) {
188
188
viperInstance .Set (CollectorBatchProcessorSendBatchSizeKey , expected .Processors .Batch .SendBatchSize )
189
189
viperInstance .Set (CollectorBatchProcessorSendBatchMaxSizeKey , expected .Processors .Batch .SendBatchMaxSize )
190
190
viperInstance .Set (CollectorBatchProcessorTimeoutKey , expected .Processors .Batch .Timeout )
191
+ viperInstance .Set (CollectorLogsGzipProcessorKey , expected .Processors .LogsGzip )
191
192
viperInstance .Set (CollectorExportersKey , expected .Exporters )
192
193
viperInstance .Set (CollectorOtlpExportersKey , expected .Exporters .OtlpExporters )
193
194
viperInstance .Set (CollectorExtensionsHealthServerHostKey , expected .Extensions .Health .Server .Host )
@@ -693,6 +694,7 @@ func getAgentConfig() *Config {
693
694
SendBatchSize : DefCollectorBatchProcessorSendBatchSize ,
694
695
Timeout : DefCollectorBatchProcessorTimeout ,
695
696
},
697
+ LogsGzip : & LogsGzip {},
696
698
},
697
699
Receivers : Receivers {
698
700
OtlpReceivers : []OtlpReceiver {
@@ -856,6 +858,7 @@ func createConfig() *Config {
856
858
},
857
859
},
858
860
},
861
+ LogsGzip : & LogsGzip {},
859
862
},
860
863
Receivers : Receivers {
861
864
OtlpReceivers : []OtlpReceiver {
Original file line number Diff line number Diff line change 64
64
CollectorBatchProcessorSendBatchSizeKey = pre (CollectorBatchProcessorKey ) + "send_batch_size"
65
65
CollectorBatchProcessorSendBatchMaxSizeKey = pre (CollectorBatchProcessorKey ) + "send_batch_max_size"
66
66
CollectorBatchProcessorTimeoutKey = pre (CollectorBatchProcessorKey ) + "timeout"
67
+ CollectorLogsGzipProcessorKey = pre (CollectorProcessorsKey ) + "logsgzip"
67
68
CollectorExtensionsKey = pre (CollectorRootKey ) + "extensions"
68
69
CollectorExtensionsHealthKey = pre (CollectorExtensionsKey ) + "health"
69
70
CollectorExtensionsHealthServerHostKey = pre (CollectorExtensionsHealthKey ) + "server_host"
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ collector:
112
112
- key: "test"
113
113
action: "insert"
114
114
value: "value"
115
+ logsgzip: {}
115
116
exporters:
116
117
otlp:
117
118
- server:
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ type (
153
153
Attribute * Attribute `yaml:"attribute" mapstructure:"attribute"`
154
154
Resource * Resource `yaml:"resource" mapstructure:"resource"`
155
155
Batch * Batch `yaml:"batch" mapstructure:"batch"`
156
+ LogsGzip * LogsGzip `yaml:"logsgzip" mapstructure:"logsgzip"`
156
157
}
157
158
158
159
Attribute struct {
@@ -181,6 +182,8 @@ type (
181
182
Timeout time.Duration `yaml:"timeout" mapstructure:"timeout"`
182
183
}
183
184
185
+ LogsGzip struct {}
186
+
184
187
// OTel Collector Receiver configuration.
185
188
Receivers struct {
186
189
ContainerMetrics * ContainerMetricsReceiver `yaml:"container_metrics" mapstructure:"container_metrics"`
You can’t perform that action at this time.
0 commit comments