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.
The ES profiling plugin does two different sorts of sampling: 1) The sampling rate that is derived from choosing a particular index.
2) An additional sampling rate that is applied if the particular index granularity leads to too many events -- e.g. if the number of events is more than 10% higher than requested, the events are subsampled further.
The client expects the results to not be scaled according to the sample rate, but the current API assumes the client will do the scaling for #1. The server, however, does the scaling for #2.
The "proper" and cleanest way would be to push scaling for both #1 and #2 into the server, and this will be done in a follow-up PR that touches both ES and Kibana. In the meantime, this PR will make sure the UI reports correct data, in case the follow-up PR encounters problems.
See also: https://github.com/elastic/prodfiler/issues/3115