Skip to content
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 UI] Fix Latency distribution chart breaks due to transaction durations of value 0 #191994

Merged

Conversation

rmyz
Copy link
Contributor

@rmyz rmyz commented Sep 3, 2024

Summary

Fixes: #184256

This PR fixes the APM latency distribution chart not being able to render when we had any duration value as 0, to fix it, we now check if it's 0 and override it with 1.

Before After
image image

Test steps

  1. Open the following file x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts
  2. Modify L61 and L118 changing the initial two values passed to getHistogramRangeSteps to 0.
    Like getHistogramRangeSteps(0, 0, steps).
    It doesn't matter the order, if one of the params is at 0 it won't render anything.
  3. Revert the change and check if the chart is being rendered.

@rmyz rmyz added the apm:charts label Sep 3, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@jennypavlova jennypavlova added release_note:fix Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Sep 3, 2024
@rmyz rmyz force-pushed the 184256-apm-ui-latency-distribution-chart-breaks-at-0 branch from 597ddc3 to 8180339 Compare September 3, 2024 14:43
@jennypavlova jennypavlova added v8.15.0 v8.14.3 backport:version Backport to applied version labels and removed v8.14.3 labels Sep 4, 2024
@rmyz rmyz force-pushed the 184256-apm-ui-latency-distribution-chart-breaks-at-0 branch from dc527be to f9b3a90 Compare September 4, 2024 11:03
@rmyz rmyz marked this pull request as ready for review September 4, 2024 11:03
@rmyz rmyz requested a review from a team as a code owner September 4, 2024 11:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Sep 4, 2024
@rmyz
Copy link
Contributor Author

rmyz commented Sep 4, 2024

/ci

Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! 🚀

@rmyz rmyz force-pushed the 184256-apm-ui-latency-distribution-chart-breaks-at-0 branch 2 times, most recently from 20c073d to a071a1b Compare September 4, 2024 13:24
@rmyz rmyz force-pushed the 184256-apm-ui-latency-distribution-chart-breaks-at-0 branch from a071a1b to a62c25d Compare September 5, 2024 09:09
@rmyz rmyz enabled auto-merge (squash) September 5, 2024 09:09
@rmyz rmyz disabled auto-merge September 5, 2024 09:23
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 5, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: a62c25d
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-191994-a62c25d70bd1

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@rmyz rmyz merged commit 917473f into elastic:main Sep 5, 2024
23 checks passed
@rmyz rmyz deleted the 184256-apm-ui-latency-distribution-chart-breaks-at-0 branch September 5, 2024 10:35
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 5, 2024
…ations of value 0 (elastic#191994)

## Summary
Fixes: elastic#184256

This PR fixes the APM latency distribution chart not being able to
render when we had any duration value as 0, to fix it, we now check if
it's 0 and override it with 1.

|Before|After|
|-|-|

|![image](https://github.com/user-attachments/assets/df224a1d-a669-4ea8-ad0e-9f81a82b904a)|![image](https://github.com/user-attachments/assets/cbf6957c-df6f-4f71-8f96-7985279912fa)|

## Test steps
1. Open the following file
`x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts`
2. Modify L61 and L118 changing the initial two values passed to
`getHistogramRangeSteps` to 0.
Like `getHistogramRangeSteps(0, 0, steps)`.
It doesn't matter the order, if one of the params is at 0 it won't
render anything.
3. Revert the change and check if the chart is being rendered.

(cherry picked from commit 917473f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 5, 2024
…ion durations of value 0 (#191994) (#192165)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[APM UI] Fix Latency distribution chart breaks due to transaction
durations of value 0
(#191994)](#191994)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-05T10:35:29Z","message":"[APM
UI] Fix Latency distribution chart breaks due to transaction durations
of value 0 (#191994)\n\n## Summary\r\nFixes:
#184256 PR fixes the
APM latency distribution chart not being able to\r\nrender when we had
any duration value as 0, to fix it, we now check if\r\nit's 0 and
override it with
1.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/df224a1d-a669-4ea8-ad0e-9f81a82b904a)|![image](https://github.com/user-attachments/assets/cbf6957c-df6f-4f71-8f96-7985279912fa)|\r\n\r\n##
Test steps\r\n1. Open the following
file\r\n`x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts`\r\n2.
Modify L61 and L118 changing the initial two values passed
to\r\n`getHistogramRangeSteps` to 0.\r\nLike `getHistogramRangeSteps(0,
0, steps)`.\r\nIt doesn't matter the order, if one of the params is at 0
it won't\r\nrender anything.\r\n3. Revert the change and check if the
chart is being
rendered.","sha":"917473f8321fd56b90f18e5a88d643d5abb7eb29","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","apm:charts","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.15.0","v8.16.0","backport:version"],"title":"[APM
UI] Fix Latency distribution chart breaks due to transaction durations
of value
0","number":191994,"url":"#191994
UI] Fix Latency distribution chart breaks due to transaction durations
of value 0 (#191994)\n\n## Summary\r\nFixes:
#184256 PR fixes the
APM latency distribution chart not being able to\r\nrender when we had
any duration value as 0, to fix it, we now check if\r\nit's 0 and
override it with
1.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/df224a1d-a669-4ea8-ad0e-9f81a82b904a)|![image](https://github.com/user-attachments/assets/cbf6957c-df6f-4f71-8f96-7985279912fa)|\r\n\r\n##
Test steps\r\n1. Open the following
file\r\n`x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts`\r\n2.
Modify L61 and L118 changing the initial two values passed
to\r\n`getHistogramRangeSteps` to 0.\r\nLike `getHistogramRangeSteps(0,
0, steps)`.\r\nIt doesn't matter the order, if one of the params is at 0
it won't\r\nrender anything.\r\n3. Revert the change and check if the
chart is being
rendered.","sha":"917473f8321fd56b90f18e5a88d643d5abb7eb29"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"#191994
UI] Fix Latency distribution chart breaks due to transaction durations
of value 0 (#191994)\n\n## Summary\r\nFixes:
#184256 PR fixes the
APM latency distribution chart not being able to\r\nrender when we had
any duration value as 0, to fix it, we now check if\r\nit's 0 and
override it with
1.\r\n\r\n|Before|After|\r\n|-|-|\r\n\r\n|![image](https://github.com/user-attachments/assets/df224a1d-a669-4ea8-ad0e-9f81a82b904a)|![image](https://github.com/user-attachments/assets/cbf6957c-df6f-4f71-8f96-7985279912fa)|\r\n\r\n##
Test steps\r\n1. Open the following
file\r\n`x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts`\r\n2.
Modify L61 and L118 changing the initial two values passed
to\r\n`getHistogramRangeSteps` to 0.\r\nLike `getHistogramRangeSteps(0,
0, steps)`.\r\nIt doesn't matter the order, if one of the params is at 0
it won't\r\nrender anything.\r\n3. Revert the change and check if the
chart is being
rendered.","sha":"917473f8321fd56b90f18e5a88d643d5abb7eb29"}}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <[email protected]>
@rmyz rmyz self-assigned this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:charts backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:fix Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.15.0 v8.15.1 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM UI] Latency distribution chart breaks due to transaction durations of value 0
8 participants