-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
out_opentelemetry: make log records batch size to configurable #6559
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 <[email protected]>
445dce0
to
46bb784
Compare
struct opentelemetry_context *ctx; | ||
ctx = out_context; | ||
|
||
// These were initially variable length arrays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use /* for comments */, what's the issue number you are referring to here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#6512
When it was a variable length array stored on the stack, the event chunk was being corrupted somewhere between 720 & 730 initialisation
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate all memory allocations
@@ -31,7 +31,7 @@ | |||
* log records, and a later batch fails, Fluent Bit will retry ALL the batches, | |||
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't "64" too low ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah should be fine since it is on the heap now
Signed-off-by: Aditya Prajapati <[email protected]>
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 [email protected]