-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Use rounded bucket sizes for transaction distribution #42830
Conversation
Pinging @elastic/apm-ui |
@@ -58,7 +58,7 @@ export function bucketFetcher( | |||
min_doc_count: 0, | |||
extended_bounds: { | |||
min: 0, | |||
max: bucketSize * bucketTargetCount | |||
max: distributionMax |
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.
The previous max
value was calculated from the rounded bucketSize
so it was not accurate and would therefore miss buckets. Using the exact distributionMax
from the stats request fixes this.
💚 Build Succeeded |
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export function roundNice(v: number) { |
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.
I feel like this file could use a more descriptive name (maybe roundToNearestFiveOrTen
?) and v
could be something like value
. Maybe a comment w/ some examples as well?
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.
Good point. I did add a test which I feel is fairly descriptive but adding examples as comments directly next to the implementation will be an improvement.
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.
LGTM, suggested one possible improvement for readability.
💚 Build Succeeded |
…p-metrics-selectall * 'master' of github.com:elastic/kibana: (306 commits) [ML] Adding job overrides to the module setup endpoint (elastic#42946) [APM] Fix missing RUM url (elastic#42940) close socket timeouts without message (elastic#42456) Upgrade elastic/charts to 8.1.6 (elastic#42518) [ML] Delete old AngularJS data visualizer and refactor folders (elastic#42962) Add custom formatting for Date Nanos Format (elastic#42445) [Vega] Shim new platform - vega_fn.js -> vega_fn.js , use ExpressionFunction (elastic#42582) add socket.getPeerCertificate to KibanaRequest (elastic#42929) [Automation] ISTANBUL PRESET PATH is not working fine with constructor(private foo) (elastic#42683) [ML] Data frames: Updated stats structure. (elastic#42923) [Code] fixed the issue that the repository can not be deleted in some cases. (elastic#42841) [kbn-es] Support for passing regex value to ES (elastic#42651) Connect to Elasticsearch via SSL when starting kibana with `--ssl` (elastic#42840) Add Elasticsearch SSL support for integration tests (elastic#41765) Fix duplicate fetch in Visualize (elastic#41204) [DOCS] TSVB and Timelion clean up (elastic#42953) [Maps] [File upload] Fix maps geojson upload hanging on index step (elastic#42623) [APM] Use rounded bucket sizes for transaction distribution (elastic#42830) [yarn.lock] consistent resolve domain (elastic#42969) [Uptime] [Test] Repurpose unit test assertions to avoid flakiness (elastic#40650) ...
…42830) * [APM] Use rounded bucket sizes for transaction distribution * Rename and add examples
@sqren This actually looks kind of weird for minutes: bug? |
@dgieselaar yeah, that does look weird. Since the bucket size is always in milliseconds that's what I based it on, but clearly that doesn't work when the client converts it to minutes 🤔 It's not a blocker for 7.4 but feel free to open an issue for it. We already have this issue for error occurrence histogram: #43503 |
I'll just add this one to that issue, looks like they roughly require the same work. |
Maybe not though 😅 I'll open a new one. |
We've gotten some feedback that the bucket sizes (interval) on the transaction distribution viz are odd - I decided to take a quick stab at it and I think it's a good improvement.
Before: tick marks are not aligned with buckets, and the bucket values are arbitrary

After: tick marks are aligned with buckets, and the bucket values are rounded

Implications:
We no longer show a fixed number of buckets. Instead we aim for the
targetBucketSize
and show a dynamic number of buckets.