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

[Lens] Add ES-request time telemetry to Lens embeddable #192743

Merged

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Sep 12, 2024

Summary

Similar to #192245, this adds request-time to the Lens Embeddable. This would allow to track these metrics anywhere where Lens is embedded.

This is particularly important for Lens embedded in a Dashboard since all performance journeys are written against Dashboards.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@thomasneirynck thomasneirynck marked this pull request as ready for review September 12, 2024 17:09
@thomasneirynck thomasneirynck requested a review from a team as a code owner September 12, 2024 17:09
@thomasneirynck thomasneirynck added release_note:skip Skip the PR/issue when compiling release notes chore telemetry Issues related to the addition of telemetry to a feature and removed chore labels Sep 12, 2024
@@ -205,8 +205,7 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({
eventName: 'lensVisualizationRenderTime',
duration: currentTime - visualizationRenderStartTime.current,
key1: 'time_to_data',
value1:
dataReceivedTime.current - visualizationRenderStartTime.current - esTookTime.current,
value1: dataReceivedTime.current - visualizationRenderStartTime.current,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#192245 changed the meaning of this time_to_data. I wouldn't change it, since it changes how to interpret that metric in historical comparisons. If we really need the difference, we can compute it at runtime (runtime fields, esql, ...)

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

LGTM thanks thomas for the refactoring

@thomasneirynck thomasneirynck added backport:version Backport to applied version labels 8.16 candidate labels Sep 19, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1460 1461 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.5MB 1.5MB +586.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
lens 51.6KB 51.7KB +140.0B

History

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

@thomasneirynck thomasneirynck merged commit 682afb7 into elastic:main Sep 20, 2024
21 checks passed
@thomasneirynck thomasneirynck added v8.16.0 backport:version Backport to applied version labels and removed backport:version Backport to applied version labels 8.16 candidate labels Sep 23, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 23, 2024
## Summary

Similar to elastic#192245, this adds
request-time to the Lens Embeddable. This would allow to track these
metrics anywhere where Lens is embedded.

This is particularly important for Lens embedded in a Dashboard since
all performance journeys are written against Dashboards.

### Checklist

Delete any items that are not applicable to this PR.

- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Marco Vettorello <[email protected]>
(cherry picked from commit 682afb7)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 23, 2024
… (#193740)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens] Add ES-request time telemetry to Lens embeddable
(#192743)](#192743)

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

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

<!--BACKPORT [{"author":{"name":"Thomas
Neirynck","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T13:24:19Z","message":"[Lens]
Add ES-request time telemetry to Lens embeddable (#192743)\n\n##
Summary\r\n\r\nSimilar to #192245,
this adds\r\nrequest-time to the Lens Embeddable. This would allow to
track these\r\nmetrics anywhere where Lens is embedded.\r\n\r\nThis is
particularly important for Lens embedded in a Dashboard since\r\nall
performance journeys are written against Dashboards.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Marco Vettorello
<[email protected]>","sha":"682afb7d8cf2712c2a4d3c64820e4baf2af100bf","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","telemetry","v8.16.0","backport:version"],"title":"[Lens]
Add ES-request time telemetry to Lens
embeddable","number":192743,"url":"https://github.com/elastic/kibana/pull/192743","mergeCommit":{"message":"[Lens]
Add ES-request time telemetry to Lens embeddable (#192743)\n\n##
Summary\r\n\r\nSimilar to #192245,
this adds\r\nrequest-time to the Lens Embeddable. This would allow to
track these\r\nmetrics anywhere where Lens is embedded.\r\n\r\nThis is
particularly important for Lens embedded in a Dashboard since\r\nall
performance journeys are written against Dashboards.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Marco Vettorello
<[email protected]>","sha":"682afb7d8cf2712c2a4d3c64820e4baf2af100bf"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192743","number":192743,"mergeCommit":{"message":"[Lens]
Add ES-request time telemetry to Lens embeddable (#192743)\n\n##
Summary\r\n\r\nSimilar to #192245,
this adds\r\nrequest-time to the Lens Embeddable. This would allow to
track these\r\nmetrics anywhere where Lens is embedded.\r\n\r\nThis is
particularly important for Lens embedded in a Dashboard since\r\nall
performance journeys are written against Dashboards.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Marco Vettorello
<[email protected]>","sha":"682afb7d8cf2712c2a4d3c64820e4baf2af100bf"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Thomas Neirynck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes telemetry Issues related to the addition of telemetry to a feature v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants