Enabled lifetime window for batch's byte size metric#18911
Merged
andsel merged 3 commits intoelastic:mainfrom Apr 1, 2026
Merged
Enabled lifetime window for batch's byte size metric#18911andsel merged 3 commits intoelastic:mainfrom
andsel merged 3 commits intoelastic:mainfrom
Conversation
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label. Could you fix it @andsel? 🙏
|
9fde998 to
6aded95
Compare
andsel
added a commit
to andsel/logstash
that referenced
this pull request
Mar 31, 2026
estolfo
approved these changes
Apr 1, 2026
Contributor
There was a problem hiding this comment.
The code looks good, with just one minor test description update.
I did some local testing. This is the byte size metric document without these changes (main):
"byte_size" : {
"current" : 8375,
"average" : {
"lifetime" : 8375,
"last_1_minute" : 8375,
"last_5_minutes" : 8375
},
"p50" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375
},
"p90" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375
},
"max" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375
}and this is the document with these changes:
"byte_size" : {
"current" : 8375,
"average" : {
"lifetime" : 8375,
"last_1_minute" : 8375,
"last_5_minutes" : 8375
},
"p50" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375,
"lifetime" : 8375
},
"p90" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375,
"lifetime" : 8375
},
"max" : {
"last_1_minute" : 8375,
"last_5_minutes" : 8375,
"lifetime" : 8375
}
logstash-core/src/test/java/org/logstash/instrument/metrics/BatchStructureMetricTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Emily S <emily.s@elastic.co>
💚 Build Succeeded
History
cc @andsel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release notes
For batch size byte size metrics also the lifetime window was added.
What does this PR do?
In BatchStructureMetric adds the lifetime retention policy.
In stats.rb API presentation layer add lifetime window only for batch's byte size metric.
Why is it important/What is the impact to the user?
LEt the user to know the p50 p90 and max for the whole life execution time.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs