File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
components/google-built-opentelemetry-collector/exporter/googleservicecontrolexporter Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ type Config struct {
41
41
UseInsecure bool `mapstructure:"use_insecure"`
42
42
LogConfig LogConfig `mapstructure:"log"`
43
43
44
- exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
45
- configretry.BackOffConfig `mapstructure:"retry_on_failure"`
46
- exporterhelper. QueueConfig `mapstructure:"sending_queue"`
44
+ TimeoutConfig exporterhelper.TimeoutConfig `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
45
+ configretry.BackOffConfig `mapstructure:"retry_on_failure"`
46
+ QueueConfig exporterhelper. QueueConfig `mapstructure:"sending_queue"`
47
47
}
48
48
49
49
type LogConfig struct {
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ func createDefaultConfig() component.Config {
85
85
// Limit queue size to prevent memory growing in case of API outage.
86
86
// This queue grows only in case of retries.
87
87
QueueSize : 3000 ,
88
+ // SizerTypeRequests (RequestSizerTypeRequests) is the default in NewDefaultQueueConfig()
89
+ Sizer : exporterhelper .RequestSizerTypeRequests ,
88
90
},
89
91
LogConfig : LogConfig {
90
92
OperationName : LogDefaultOperationName ,
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ func TestCreateExporterFromConfig(t *testing.T) {
68
68
Enabled : true ,
69
69
NumConsumers : 5 ,
70
70
QueueSize : 1000 ,
71
+ Sizer : exporterhelper .RequestSizerTypeRequests ,
71
72
},
72
73
ServiceControlEndpoint : "test.googleapis.com:443" ,
73
74
ConsumerProject : "my-project-id" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ exporters:
26
26
enabled : true
27
27
num_consumers : 5
28
28
queue_size : 1000
29
+ sizer : " requests"
29
30
log :
30
31
default_log_name : " log-name"
31
32
operation_name : " test-operation-name"
You can’t perform that action at this time.
0 commit comments