kibana
kibana copied to clipboard
[ML] APM Correlations: Fix chart errors caused by inconsistent histogram range steps.
Summary
The AreaSeries
for the latency correlations charts expect the provided timestamp keys for each series to be the same, otherwise there might be errors in how the chart renders the areas. In some cases this could happen because we fetch the data for the areas independently (for example overall latency and failed transactions latency).
The fix provided by this PR adds optional durationMin
and durationMax
parameters to affected endpoints. This way the durationMin/Max
returned by the first area request (for example "overall latency") can be passed on to the second request to enforce the same buckets/keys (for example for "failed transaction latency").
This also updates the chart code to make use of some newly available styles in Elastic Charts for orphaned points (https://github.com/elastic/elastic-charts/pull/1505)
Before:

After:

Checklist
- [x] Unit or functional tests were updated or added to match the most common scenarios
- [ ] This was checked for cross-browser compatibility
- [x] This was checked for breaking API changes and was labeled appropriately
Up for discussion: So far, as can be seen in the screenshots of the PR description, the area lines disappear when they are 0. As an alternative, we could show a continuous line:

Pinging @elastic/ml-ui (:ml)
Pinging @elastic/apm-ui (Team:apm)
Tested and LGTM 🎉 As for whether to show the continuous line, I think it's less crowded to not show the line when the values are 0 but have no strong opinion about it.
Up for discussion: So far, as can be seen in the screenshots of the PR description, the area lines disappear when they are 0. As an alternative, we could show a continuous line:
![]()
@walterra I would prefer the lines would disappear if 0
as initially proposed.
@formgeist @qn895 thanks for the feedback I kept original look now with the lines being interrupted when they hit 0.
@cauemarcondes Thanks for your feedback, I addressed your comments, ready for another look.
:yellow_heart: Build succeeded, but was flaky
- Buildkite Build
- Commit: d0a41b35e0a85c916fae1567c6e87d740b2520a0
Failed CI Steps
Metrics [docs]
Async chunks
Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app
id | before | after | diff |
---|---|---|---|
apm |
3.0MB | 3.0MB | +493.0B |
History
- :yellow_heart: Build #64159 was flaky 4ad0a05e622756287a64e4f681bf9240855acbfc
- :yellow_heart: Build #63703 was flaky 64fff2930c986fe87b12337e1e6eabd606252ec1
- :broken_heart: Build #63680 failed 4c7e405d75d102ae6faa0ff6679399c04e416efe
- :broken_heart: Build #63584 failed 8d4cb803ee96e1f39791ca6f57630a29cf81ecf9
To update your PR or re-run it, just comment with:
@elasticmachine merge upstream
cc @walterra
Tested latest changes and functionally LGTM 🎉
💚 All backports created successfully
Status | Branch | Result |
---|---|---|
✅ | 8.4 |
Note: Successful backport PRs will be merged automatically after passing CI.
Questions ?
Please refer to the Backport tool documentation