-
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
[Cloud Security] Fixes SVG flickering and adding insight telemetry #198812
[Cloud Security] Fixes SVG flickering and adding insight telemetry #198812
Conversation
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
useEffect(() => { | ||
uiMetricService.trackUiMetric( | ||
METRIC_TYPE.COUNT, | ||
`${MISCONFIGURATION_INSIGHT} instance id: ${dataTestSubj}` |
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 wouldn't couple the test id with the tracking tbh, let's introduce a prop dedicated to tracking. If we change the test id for some reason, the tracking info will also change which might affect reports and numbers
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.
makes sense. @CohenIdo would we also want to insert the field (user/host) to the id? so we can track which is more used?
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.
yes.
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've added a telemetrySuffix
prop. left the values as plain texts rather than constants because if this component will be moved i prefer it to be clear that the suffix might need to change as well.
useEffect(() => { | ||
uiMetricService.trackUiMetric( | ||
METRIC_TYPE.COUNT, | ||
`${MISCONFIGURATION_INSIGHT} instance id: ${dataTestSubj}` |
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.
yes.
…svg-flicker-and-adding-telemtry
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11704942785 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
cc @JordanSh |
…lastic#198812) (cherry picked from commit de46e7f)
…lastic#198812) (cherry picked from commit de46e7f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…try (#198812) (#199142) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)](#198812) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jordan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T13:52:30Z","message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud Security","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[Cloud Security] Fixes SVG flickering and adding insight telemetry","number":198812,"url":"https://github.com/elastic/kibana/pull/198812","mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198812","number":198812,"mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jordan <[email protected]>
…etry (#198812) (#199141) # Backport This will backport the following commits from `main` to `8.16`: - [[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)](#198812) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jordan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T13:52:30Z","message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud Security","backport:prev-minor","v8.16.0","backport:version","v8.17.0"],"title":"[Cloud Security] Fixes SVG flickering and adding insight telemetry","number":198812,"url":"https://github.com/elastic/kibana/pull/198812","mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198812","number":198812,"mergeCommit":{"message":"[Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812)","sha":"de46e7f0739eb14138655e204d4be77d8e24ff37"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jordan <[email protected]>
Summary
Resolves Onboarding blocks "jump" while images being loaded
Resolves Add telemetry for posture data in alerts flyout
Fixes flickering while SVG is loading by setting a container component with set height
Added container with fixed height and width, matching the other SVGs which are used in this empty state UI.
Video shows no flickering while disabled cache is active and paginating between the tables
Screen.Recording.2024-11-04.at.17.43.30.mov
Adding telemetry counters to the new flyout elements
The insights component is being reused multiple times on the alert flyout and expaded details flyout as can be seen here:
I've utilized the test-subj-id in order to differentiate between render instances
Here is how it looks in the telemetry: