Skip to content

Commit

Permalink
[8.x] [Synthetics] Fix ping heatmap payload (#195107) (#195439)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Synthetics] Fix ping heatmap payload
(#195107)](#195107)

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

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

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T14:46:30Z","message":"[Synthetics]
Fix ping heatmap payload (#195107)\n\n## Summary\r\n\r\nWe addressed
#180076 recently\r\nwith these
two PRs:\r\n\r\n- https://github.com/elastic/kibana/pull/184177\r\n-
https://github.com/elastic/kibana/pull/192508\r\n\r\nWe were seeing a
strange error that was difficult to repro, so we put in\r\na best-effort
patch that was still ineffective. The reason this issue\r\nhappens is
because in the code it's possible to divide by 0, which\r\nyields a
value of `Infinity`, which at some point causes our interval\r\nvalue
supplied to the server route to be an empty string.\r\n\r\nThis patch
will make it so that we never pass a value of 0 to be used in\r\nthe
calculation of bucket sizes in this
hook.","sha":"560d561e21fe51020954bd9e3246f238ffa026ba","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0","v8.15.3"],"title":"[Synthetics]
Fix ping heatmap
payload","number":195107,"url":"https://github.com/elastic/kibana/pull/195107","mergeCommit":{"message":"[Synthetics]
Fix ping heatmap payload (#195107)\n\n## Summary\r\n\r\nWe addressed
#180076 recently\r\nwith these
two PRs:\r\n\r\n- https://github.com/elastic/kibana/pull/184177\r\n-
https://github.com/elastic/kibana/pull/192508\r\n\r\nWe were seeing a
strange error that was difficult to repro, so we put in\r\na best-effort
patch that was still ineffective. The reason this issue\r\nhappens is
because in the code it's possible to divide by 0, which\r\nyields a
value of `Infinity`, which at some point causes our interval\r\nvalue
supplied to the server route to be an empty string.\r\n\r\nThis patch
will make it so that we never pass a value of 0 to be used in\r\nthe
calculation of bucket sizes in this
hook.","sha":"560d561e21fe51020954bd9e3246f238ffa026ba"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195107","number":195107,"mergeCommit":{"message":"[Synthetics]
Fix ping heatmap payload (#195107)\n\n## Summary\r\n\r\nWe addressed
#180076 recently\r\nwith these
two PRs:\r\n\r\n- https://github.com/elastic/kibana/pull/184177\r\n-
https://github.com/elastic/kibana/pull/192508\r\n\r\nWe were seeing a
strange error that was difficult to repro, so we put in\r\na best-effort
patch that was still ineffective. The reason this issue\r\nhappens is
because in the code it's possible to divide by 0, which\r\nyields a
value of `Infinity`, which at some point causes our interval\r\nvalue
supplied to the server route to be an empty string.\r\n\r\nThis patch
will make it so that we never pass a value of 0 to be used in\r\nthe
calculation of bucket sizes in this
hook.","sha":"560d561e21fe51020954bd9e3246f238ffa026ba"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Justin Kambic <[email protected]>
  • Loading branch information
kibanamachine and justinkambic authored Oct 8, 2024
1 parent c033f0d commit c6c4d20
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const useMonitorStatusData = ({ from, to, initialSizeRef }: Props) => {

useDebounce(
async () => {
setDebouncedCount(binsAvailableByWidth);
setDebouncedCount(binsAvailableByWidth === 0 ? null : binsAvailableByWidth);
},
500,
[binsAvailableByWidth]
Expand Down

0 comments on commit c6c4d20

Please sign in to comment.