-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fix value mapping for min and max aggregation type in Azure Monitor #37643
Fix value mapping for min and max aggregation type in Azure Monitor #37643
Conversation
Metric values for `min` and `max` aggregation types were picked up from the wrong place.
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Co-authored-by: Andrew Gizas <andreas.gkizas@elastic.co>
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
❕ Build Aborted
Expand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
💚 Build Succeeded
Expand to view the summary
Build stats
❕ Flaky test reportNo test was executed to be analysed. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
…37643) (#37648) * Fix value mapping for min and max aggregation type Metric values for `min` and `max` aggregation types were picked up from the wrong place. --------- Co-authored-by: Andrew Gizas <andreas.gkizas@elastic.co> (cherry picked from commit 1554d7d) Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
…37643) (#37649) * Fix value mapping for min and max aggregation type Metric values for `min` and `max` aggregation types were picked up from the wrong place. --------- Co-authored-by: Andrew Gizas <andreas.gkizas@elastic.co> (cherry picked from commit 1554d7d) Co-authored-by: Maurizio Branca <maurizio.branca@elastic.co>
…lastic#37643) * Fix value mapping for min and max aggregation type Metric values for `min` and `max` aggregation types were picked up from the wrong place. --------- Co-authored-by: Andrew Gizas <andreas.gkizas@elastic.co>
Proposed commit message
Fix mapping of metric values from
Metric
toKeyValuePoint
. Unfortunately, I didn't notice the code formin
andmax
aggregations picked up the value from theavg
field. This is a silly mistake with nasty consequences.I added a basic unit test to check the expected behavior.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Set up the Azure Monitor metricset with the following Metricbeat module configuration:
Run the metricset to collect some metrics.
The collected documents must contain metrics having
min
andmax
aggregation types (for example,azure.metrics.server_load.max
).Related issues
Screenshots
With the fix, I am able to successfully collect metric with
max
aggregation: