-
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
[Step 3] VisEditors Telemetry enhancements (add new agg-based and lens telemetries) #135615
Merged
Merged
Changes from 50 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
88a4445
initial comit
alexwizp d162e8e
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine f49fcdc
push chart_expressions logic
alexwizp 85e72e4
update tests
alexwizp d8f22b7
fix JEST
alexwizp c19effd
push some telemetries
alexwizp bbe81ee
fix some cases
alexwizp 2983c10
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 5216d02
update tests
alexwizp 5b45314
add some lens part
alexwizp e44ffaf
add handlers.logRenderTelemetry method
alexwizp 6f19ac8
visGroup -> originatingApp
alexwizp 06fc16a
remove visTpe, extra, onlyExtra
alexwizp 889de52
remove handlers.logRenderTelemetry from handlers
alexwizp 0a5e43d
remove context from snapshots
alexwizp 0de8332
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 202dbe6
add lens operations telemetry
alexwizp a5dae2e
fix heaatmap, vislib
alexwizp e44f8d9
push some telemetries
alexwizp 66488c7
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 3effc43
Merge branch 'lens-emb' into telemetry_1
alexwizp 0e35990
cleanup
alexwizp 208e84b
push some logic
alexwizp 7645cbe
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 0ab03db
fix merge conflicts
alexwizp 268ed67
push some logic
alexwizp 56f4f7e
add lens map telemetry
alexwizp 733f9c0
add render_lens_vis_cases
alexwizp c19d736
add render_lens_vis_observability_exploratory_view
alexwizp ccdeb56
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 75cfe46
cleanup
alexwizp db05044
cleanup
alexwizp bec9aa4
make getRenderEventCounters optional
alexwizp 9cf6c07
add summary_row and color_by_value telemetries
alexwizp 4124ad1
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 5886603
try to fix double rendering
alexwizp 5d81cfe
update xy telemetries
alexwizp e7cdca3
fix TSVB
alexwizp 41c8303
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 5fd079b
fix lens
alexwizp 5a2f920
fix Timelion
alexwizp ef8cc9b
Merge branch 'main' into telemetry_1
kibanamachine a1bd5f1
add mixed_xy telemetry
alexwizp 758b4cf
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine 8610240
Merge branch 'main' into telemetry_1
kibanamachine 6f7148d
Update x-pack/plugins/observability/public/components/shared/explorat…
alexwizp 7df1e45
Update x-pack/plugins/observability/public/components/shared/explorat…
alexwizp c4da22e
Update expression_renderer.tsx
alexwizp a9ef0c0
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp f1f5bf0
update originatingApp
alexwizp 73c358e
Update expression_renderer.tsx
alexwizp c1933ce
add JEST for core changes
alexwizp afc03cd
Merge branch 'main' into telemetry_1
kibanamachine 6338af3
Update plugin.ts
alexwizp 50c2ba6
Update src/plugins/expressions/common/expression_renderers/types.ts
alexwizp 7ba73e7
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp 0c84779
fix PR comments
alexwizp 47f964d
add renderComplete param to VisualizationContainer
alexwizp b2c2acd
fix mixed_xy issue
alexwizp 4cc6034
Merge branch 'main' into telemetry_1
kibanamachine 71cc2d0
Merge remote-tracking branch 'upstream/main' into telemetry_1
alexwizp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ export const storybookAliases = { | |
es_ui_shared: 'src/plugins/es_ui_shared/.storybook', | ||
expression_error: 'src/plugins/expression_error/.storybook', | ||
expression_image: 'src/plugins/expression_image/.storybook', | ||
expression_metric_vis: 'src/plugins/chart_expressions/expression_metric/.storybook', | ||
expression_metric_vis: 'src/plugins/chart_expressions/expression_legacy_metric/.storybook', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix regression of #135461 |
||
expression_metric: 'src/plugins/expression_metric/.storybook', | ||
expression_partition_vis: 'src/plugins/chart_expressions/expression_partition_vis/.storybook', | ||
expression_repeat_image: 'src/plugins/expression_repeat_image/.storybook', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export { extractContainerType, extractVisualizationType } from './utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { KibanaExecutionContext } from '@kbn/core-execution-context-common'; | ||
|
||
export const extractContainerType = (context?: KibanaExecutionContext): string | undefined => { | ||
if (context) { | ||
const recursiveGet = (item: KibanaExecutionContext): KibanaExecutionContext | undefined => { | ||
if (item.type) { | ||
return item; | ||
} else if (item.child) { | ||
return recursiveGet(item.child); | ||
} | ||
}; | ||
return recursiveGet(context)?.type; | ||
} | ||
}; | ||
|
||
export const extractVisualizationType = (context?: KibanaExecutionContext): string | undefined => { | ||
if (context) { | ||
const recursiveGet = (item: KibanaExecutionContext): KibanaExecutionContext | undefined => { | ||
if (item.child) { | ||
return recursiveGet(item.child); | ||
} else { | ||
return item; | ||
} | ||
}; | ||
return recursiveGet(context)?.type; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Given this is the only
core
file modified in this PR, I'm assuming this addition is not used by our EC system. May I ask what the purpose of this new field is, exactly? How/Where are you using it?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.
we have 2 telemetries for which we need to pass additional meta information. It's a
viewMode
andfullscreenMode
. It this PR we set it in indashboard/public/application/hooks/use_dashboard_app_state.ts
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.
Ok, I'm probably missing something here.
To my knowledge, apart from sending it to the server / ES for context tracking, the EC is used in 2 places:
kibana/src/core/public/apm_system.ts
Lines 73 to 78 in f609f09
kibana/packages/core/execution-context/core-execution-context-browser-internal/src/execution_context_service.ts
Lines 62 to 68 in f609f09
Which, without changes, is not using this new
meta
fieldkibana/packages/core/execution-context/core-execution-context-browser-internal/src/execution_context_service.ts
Lines 119 to 129 in f609f09
Which, without changes, is not using this new
meta
field either.So, where exactly is this new field consumed? Is that in custom telemetry collectors?
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.
@pgayvallet For now we don't send it out in custom telemetry collectors but pick it from the context in the expression renderer and pass it to ui counters. Definitely possible we want to add such an integration at a later point though.
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.
It was implemented here cause we need somehow to pass
viewMode
andfullscreenMode
properties from the container (e.g.DashboardContainer
) intoRender expression
function. Therefore, the main consumer of this is: lens/public/embeddable/embeddable.tsx (seegetExecutionContextEvents
method).