-
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
enhancement(aws_cloudwatch_logs sink): Enforce age requirements #2437
Conversation
Thanks @ktff. Just confirming, performance-wise does anything jump out here that might reduce that? |
@binarylogic The Other than that, there is an additional passage over messages for splitting them into 24h batches, but I now see that we can optimize it and introduce a fast path for majority case. |
Perfect, thanks! |
Signed-off-by: ktf <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
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.
Looks like a good start, but I have a few questions. Let me know if you have any questions.
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
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.
Ok, looks great to me! I'd be curious if we can add a bit more test coverage around the splitting logic.
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
* Time filtering Signed-off-by: ktf <krunotf@gmail.com> * Add 24h split Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Add test Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Fix remainder range Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Add optimization Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Remove extra buffer time Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Move filtering to outer layer Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Fix Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Add split_off Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Add 24h split test Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com> * Bump Signed-off-by: Kruno Tomola Fabro <krunotf@gmail.com>
Closes #1483
Open questions
Regarding
part of the second constraint I'm unsure in how to deal with it?
Actually implementing this would somewhat complicate the sink, for a case which would happen rarely. If this isn't added, in the worst case
aws
may drop that batch which would have a limited effect since we are splitting the batches into 24h pieces. And dropping older messages also shouldn't be a problem since there is already a precedent of dropping messages older than 14 days. (EDIT: filtering on 14day should be enough)