Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.18](backport #42797) [fbreceiver] - Fix batcher's configuration #42828

Open
wants to merge 1 commit into
base: 8.18
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[fbreceiver] - Fix batcher's configuration (#42797)
* fix: batcher min_size_items

* update tests

* set min_size_items to 0

* fix tests

* fix tests

* fix test

(cherry picked from commit 2f3df16)

# Conflicts:
#	libbeat/otelbeat/beatconverter/beatconverter_test.go
#	libbeat/otelbeat/oteltranslate/outputs/elasticsearch/config_otel_test.go
  • Loading branch information
VihasMakwana authored and mergify[bot] committed Feb 21, 2025
commit f7b4c4f948c8eae70445bd5f0370d0e71f7e7f85
12 changes: 12 additions & 0 deletions libbeat/otelbeat/beatconverter/beatconverter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ exporters:
batcher:
enabled: true
max_size_items: 1600
<<<<<<< HEAD
=======
min_size_items: 0
mapping:
mode: bodymap
>>>>>>> 2f3df1694 ([fbreceiver] - Fix batcher's configuration (#42797))
`

func TestConverter(t *testing.T) {
Expand Down Expand Up @@ -187,6 +193,12 @@ exporters:
batcher:
enabled: true
max_size_items: 1600
<<<<<<< HEAD
=======
min_size_items: 0
mapping:
mode: bodymap
>>>>>>> 2f3df1694 ([fbreceiver] - Fix batcher's configuration (#42797))
receivers:
filebeatreceiver:
filebeat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func ToOTelConfig(output *config.C) (map[string]any, error) {
"batcher": map[string]any{
"enabled": true,
"max_size_items": escfg.BulkMaxSize, // bulk_max_size
"min_size_items": 0, // 0 means immediately trigger a flush
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ headers:
batcher:
enabled: true
max_size_items: 1600
<<<<<<< HEAD
=======
min_size_items: 0
mapping:
mode: bodymap
>>>>>>> 2f3df1694 ([fbreceiver] - Fix batcher's configuration (#42797))
`
input := newFromYamlString(t, beatCfg)
cfg := config.MustNewConfigFrom(input.ToStringMap())
Expand Down Expand Up @@ -125,6 +131,7 @@ num_workers: 1
batcher:
enabled: true
max_size_items: 1600
min_size_items: 0
`,
},
{
Expand All @@ -135,6 +142,7 @@ num_workers: 4
batcher:
enabled: true
max_size_items: 1600
min_size_items: 0
`,
},
{
Expand All @@ -157,6 +165,12 @@ num_workers: 1
batcher:
enabled: true
max_size_items: 1600
<<<<<<< HEAD
=======
min_size_items: 0
mapping:
mode: bodymap
>>>>>>> 2f3df1694 ([fbreceiver] - Fix batcher's configuration (#42797))
`,
},
{
Expand All @@ -167,6 +181,7 @@ num_workers: 1
batcher:
enabled: true
max_size_items: 50
min_size_items: 0
`,
},
{
Expand All @@ -177,6 +192,7 @@ num_workers: 0
batcher:
enabled: true
max_size_items: 1600
min_size_items: 0
`,
},
}
Expand Down
Loading