-
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] Time spent by span type chart rendering problem #202343
Comments
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
The chart represents values proportionally with alphabetical order (from the bottom to the top). Therefore, if the one value spikes, it raises the lines for all the following values. Consider this example (2nd value occupies 99%, therefore 3rd value spikes to the top): In this example, I swapped the order, so the 1st value occupies 99%. This causes the 2nd and 3rd values to spike to the top: This isn't clearly visible in the example from SDH because their chart is broken due to negative numbers being provided. That is the reason for lines to cross. I addressed the problem in my PR. However, it would be good to investigate APM server to find why negative values happened in the first place. SHD scenario with negative values (original): SHD scenario with negative values clamped to zero (after fix): |
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892"> (cherry picked from commit ab9de64)
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892"> (cherry picked from commit ab9de64)
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892"> (cherry picked from commit ab9de64)
…ems (#202755) (#203066) # Backport This will backport the following commits from `main` to `8.x`: - [[APM] `Time spent by span type` chart rendering problems (#202755)](#202755) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Milosz Marcinkowski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T10:08:05Z","message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[APM] `Time spent by span type` chart rendering problems","number":202755,"url":"https://github.com/elastic/kibana/pull/202755","mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202755","number":202755,"mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}}]}] BACKPORT--> Co-authored-by: Milosz Marcinkowski <[email protected]>
) (#203075) # Backport This will backport the following commits from `main` to `8.16`: - [[APM] `Time spent by span type` chart rendering problems (#202755)](#202755) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Milosz Marcinkowski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T10:08:05Z","message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"number":202755,"url":"https://github.com/elastic/kibana/pull/202755","mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202755","number":202755,"mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}},{"url":"https://github.com/elastic/kibana/pull/203066","number":203066,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
) (#203074) # Backport This will backport the following commits from `main` to `8.17`: - [[APM] `Time spent by span type` chart rendering problems (#202755)](#202755) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Milosz Marcinkowski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-05T10:08:05Z","message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"number":202755,"url":"https://github.com/elastic/kibana/pull/202755","mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202755","number":202755,"mergeCommit":{"message":"[APM] `Time spent by span type` chart rendering problems (#202755)\n\nCloses #202343\r\n\r\n## Summary\r\n\r\nThis PR solves the following issues in `Time spent by span type` chart:\r\n- limits percentages between 0% and 100% (converts negative values to\r\n0%),\r\n\r\nbefore: \r\n<img width=\"1134\" alt=\"Screenshot 2024-12-04 at 15 28 18\"\r\nsrc=\"https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3\">\r\nafter:\r\n<img width=\"1135\" alt=\"Screenshot 2024-12-04 at 15 30 25\"\r\nsrc=\"https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734\">\r\n\r\n---\r\n\r\n- rounds percentage to 8 decimal points to prevent scientific notation\r\nin charts (poor readability)\r\n\r\nbefore: \r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 36 54\"\r\nsrc=\"https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369\">\r\nafter:\r\n<img width=\"1132\" alt=\"Screenshot 2024-12-04 at 14 35 39\"\r\nsrc=\"https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892\">","sha":"ab9de649fe32b22b4f847d190be73fbf229a1ac8"}},{"url":"https://github.com/elastic/kibana/pull/203066","number":203066,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
) Closes elastic#202343 ## Summary This PR solves the following issues in `Time spent by span type` chart: - limits percentages between 0% and 100% (converts negative values to 0%), before: <img width="1134" alt="Screenshot 2024-12-04 at 15 28 18" src="https://github.com/user-attachments/assets/73285e87-3aef-4b2d-8e2a-7e3ec87680f3"> after: <img width="1135" alt="Screenshot 2024-12-04 at 15 30 25" src="https://github.com/user-attachments/assets/ae25cb85-d31a-490a-96c7-d4475952c734"> --- - rounds percentage to 8 decimal points to prevent scientific notation in charts (poor readability) before: <img width="1132" alt="Screenshot 2024-12-04 at 14 36 54" src="https://github.com/user-attachments/assets/528cda4b-ae84-4dbd-9d3f-88896e63a369"> after: <img width="1132" alt="Screenshot 2024-12-04 at 14 35 39" src="https://github.com/user-attachments/assets/9a0bdce9-6d66-4aaf-a131-18644eab1892">
Summary
The Time spent by span type chart has problems rendering the data when:
1 - There are big gaps between metric collection. This causes the percentage calculation to generate really small numbers eg
subBucket.total_self_time_per_subtype.value=3539
andsumAllSelfTimes=36963655477
results in4.7769449682984235e-8
2 - For some reason, the chart renders the data points incorrectly in this situation. In the example below
HTMLWrappedInJSON
value is 0 at that timestamp, but the line spikes as if the value was 100%Possible fix
Math.min(Math.max(percentage, 0), 1).toFixed(12)
AreaSeries
usage missing, that is present ontimeseries_component
How to reproduce
node ./generate_transaction_spent_by_span_response.js > response.json
.*/internal/apm/services/.*/transaction/charts/breakdown
with the json aboveThe text was updated successfully, but these errors were encountered: