Skip to content

Commit 44e48ba

Browse files
authored
[exporter/clickhouse] Use the standard default of 10 queue consumers (#34176)
**Description:** The default number of [queue consumers is in the exporter helper 10](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/queue_sender.go#L45). This default is respected by every other exporter in this repo except for the ClickHouse exporter. A default of 1 is way too low for any major workload and adds a low ceiling to the vertical scalability of a single collector. **Link to tracking Issue:** n/a **Testing:** n/a **Documentation:** Added the default values to the README
1 parent 51f4a89 commit 44e48ba

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: clickhouseexporter
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Increase the default number of queue consumers to 10
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [34176]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

exporter/clickhouseexporter/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ Processing:
312312

313313
- `timeout` (default = 5s): The timeout for every attempt to send data to the backend.
314314
- `sending_queue`
315+
- `enabled` (default = true)
316+
- `num_consumers` (default = 10): Number of consumers that dequeue batches; ignored if `enabled` is `false`
315317
- `queue_size` (default = 1000): Maximum number of batches kept in memory before dropping data.
316318
- `retry_on_failure`
317319
- `enabled` (default = true)

exporter/clickhouseexporter/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func TestLoadConfig(t *testing.T) {
7070
ConnectionParams: map[string]string{},
7171
QueueSettings: exporterhelper.QueueSettings{
7272
Enabled: true,
73-
NumConsumers: 1,
73+
NumConsumers: 10,
7474
QueueSize: 100,
7575
StorageID: &storageID,
7676
},

exporter/clickhouseexporter/factory.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ func NewFactory() exporter.Factory {
3030
}
3131

3232
func createDefaultConfig() component.Config {
33-
queueSettings := exporterhelper.NewDefaultQueueSettings()
34-
queueSettings.NumConsumers = 1
35-
3633
return &Config{
3734
TimeoutSettings: exporterhelper.NewDefaultTimeoutSettings(),
38-
QueueSettings: queueSettings,
35+
QueueSettings: exporterhelper.NewDefaultQueueSettings(),
3936
BackOffConfig: configretry.NewDefaultBackOffConfig(),
4037
ConnectionParams: map[string]string{},
4138
Database: defaultDatabase,

0 commit comments

Comments
 (0)