@@ -13,6 +13,7 @@ import (
13
13
"go.opentelemetry.io/collector/config/configretry"
14
14
"go.opentelemetry.io/collector/consumer"
15
15
"go.opentelemetry.io/collector/exporter"
16
+ "go.opentelemetry.io/collector/exporter/exporterbatcher"
16
17
"go.opentelemetry.io/collector/exporter/exporterhelper"
17
18
"go.opentelemetry.io/collector/exporter/otlpexporter/internal/metadata"
18
19
)
@@ -29,10 +30,14 @@ func NewFactory() exporter.Factory {
29
30
}
30
31
31
32
func createDefaultConfig () component.Config {
33
+ batcherCfg := exporterbatcher .NewDefaultConfig ()
34
+ batcherCfg .Enabled = false
35
+
32
36
return & Config {
33
37
TimeoutSettings : exporterhelper .NewDefaultTimeoutSettings (),
34
38
RetryConfig : configretry .NewDefaultBackOffConfig (),
35
39
QueueConfig : exporterhelper .NewDefaultQueueSettings (),
40
+ BatcherConfig : batcherCfg ,
36
41
ClientConfig : configgrpc.ClientConfig {
37
42
Headers : map [string ]configopaque.String {},
38
43
// Default to gzip compression
@@ -56,8 +61,10 @@ func createTracesExporter(
56
61
exporterhelper .WithTimeout (oCfg .TimeoutSettings ),
57
62
exporterhelper .WithRetry (oCfg .RetryConfig ),
58
63
exporterhelper .WithQueue (oCfg .QueueConfig ),
64
+ exporterhelper .WithBatcher (oCfg .BatcherConfig ),
59
65
exporterhelper .WithStart (oce .start ),
60
- exporterhelper .WithShutdown (oce .shutdown ))
66
+ exporterhelper .WithShutdown (oce .shutdown ),
67
+ )
61
68
}
62
69
63
70
func createMetricsExporter (
@@ -73,6 +80,7 @@ func createMetricsExporter(
73
80
exporterhelper .WithTimeout (oCfg .TimeoutSettings ),
74
81
exporterhelper .WithRetry (oCfg .RetryConfig ),
75
82
exporterhelper .WithQueue (oCfg .QueueConfig ),
83
+ exporterhelper .WithBatcher (oCfg .BatcherConfig ),
76
84
exporterhelper .WithStart (oce .start ),
77
85
exporterhelper .WithShutdown (oce .shutdown ),
78
86
)
@@ -91,6 +99,7 @@ func createLogsExporter(
91
99
exporterhelper .WithTimeout (oCfg .TimeoutSettings ),
92
100
exporterhelper .WithRetry (oCfg .RetryConfig ),
93
101
exporterhelper .WithQueue (oCfg .QueueConfig ),
102
+ exporterhelper .WithBatcher (oCfg .BatcherConfig ),
94
103
exporterhelper .WithStart (oce .start ),
95
104
exporterhelper .WithShutdown (oce .shutdown ),
96
105
)
0 commit comments