[Metrics] Pod OTEL metrics table: review follow-ups from #259552#262708
[Metrics] Pod OTEL metrics table: review follow-ups from #259552#262708rmyz merged 2 commits intoelastic:mainfrom
Conversation
Hoist unpackRow in calculateMetricAverages, use for..of and const for averages per jennypavlova review on elastic#259552. Guard working_set byte conversion with Number.isFinite before dividing to MB, per review question on elastic#259552. Related: elastic#259552 Made-with: Cursor
|
/ci |
|
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
cc @rmyz |
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
ApprovabilityVerdict: Needs human review This PR contains mechanical refactoring (loop style, variable destructuring, ternary expressions) and adds a defensive Number.isFinite check. While the changes are low-risk code cleanup, the author does not own this file which is explicitly owned by @elastic/obs-presentation-team, warranting review by the designated owners. You can customize Macroscope's approvability policy. Learn more. |
miloszmarcinkowski
left a comment
There was a problem hiding this comment.
LGTM, tested locally
|
Starting backport for target branches: 8.19, 9.3, 9.4 https://github.com/elastic/kibana/actions/runs/24385315870 |
… (elastic#262708) (cherry picked from commit 79208d3)
… (elastic#262708) (cherry picked from commit 79208d3)
… (elastic#262708) (cherry picked from commit 79208d3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#262708) (#262939) # Backport This will backport the following commits from `main` to `9.3`: - [[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)](#262708) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sergi Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
#262708) (#262940) # Backport This will backport the following commits from `main` to `9.4`: - [[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)](#262708) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sergi Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
… (#262708) (#262938) # Backport This will backport the following commits from `main` to `8.19`: - [[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)](#262708) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sergi Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2026-04-14T06:53:29Z","message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","Team:obs-presentation","v9.5.0","v9.3.4","v8.19.15"],"title":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552","number":262708,"url":"https://github.com/elastic/kibana/pull/262708","mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3","8.19"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262708","number":262708,"mergeCommit":{"message":"[Metrics] Pod OTEL metrics table: review follow-ups from #259552 (#262708)","sha":"79208d3e820bebbfb5de90863b039c949c551d78"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.15","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
Summary
Follow-up to review feedback on #259552 (discussion).
unpackRow(unpackMetricsOtelvsunpackMetrics) outside the row loop, usefor..ofwith destructuring, and express CPU/memory averages withconstternaries (@jennypavlova).memory.working_setto MB when the unpacked value is a finitenumber, avoiding bad division on unexpected types (@jennypavlova).Release note
Skip — small refactor / defensive check in an internal metrics path.
Risk
Low. Behavior unchanged for valid numeric OTLP payloads; invalid values map to
nullfor MB instead ofNaN.