out_opentelemetry: make log records batch size to configurable#6559
out_opentelemetry: make log records batch size to configurable#6559Syn3rman wants to merge 2 commits intofluent:masterfrom
Conversation
|
@Syn3rman windows CI is failing, to review the PR we need at least CI passing @leonardo-albertovich would you please review the PR once CI is ready ? |
|
|
@edsiper fixed, the failing tests are unrelated and should be adressed by #6569 @leonardo-albertovich this is now ready for review, I've moved the variables to heap and added check on batch_size (valgrind is happy too) |
Signed-off-by: Aditya Prajapati <aditya@calyptia.com>
445dce0 to
46bb784
Compare
| struct opentelemetry_context *ctx; | ||
| ctx = out_context; | ||
|
|
||
| // These were initially variable length arrays. |
There was a problem hiding this comment.
use /* for comments */, what's the issue number you are referring to here ?
There was a problem hiding this comment.
#6512
When it was a variable length array stored on the stack, the event chunk was being corrupted somewhere between 720 & 730 initialisation
| struct opentelemetry_context *ctx; | ||
|
|
||
| for(index = 0 ; index < FLB_LOG_RECORD_BATCH_SIZE ; index++) { | ||
| log_record_list = (Opentelemetry__Proto__Logs__V1__LogRecord *) flb_calloc(ctx->batch_size, sizeof(Opentelemetry__Proto__Logs__V1__LogRecord *)); |
There was a problem hiding this comment.
validate all memory allocations
| * including the ones that succeeded. This is not ideal. | ||
| */ | ||
| #define FLB_LOG_RECORD_BATCH_SIZE 1000 | ||
| #define DEFAULT_LOG_RECORD_BATCH_SIZE "64" |
There was a problem hiding this comment.
Oh yeah should be fine since it is on the heap now
Signed-off-by: Aditya Prajapati <aditya@calyptia.com>
46bb784 to
0158080
Compare
|
merged as #6583 (this CI is stuck) |
Fixes #6512 & #6457
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Signed-off-by: Aditya Prajapati aditya@calyptia.com