[data.search.session] Search session UI telemetry#89950
[data.search.session] Search session UI telemetry#89950Dosant merged 28 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app-services (Team:AppServices) |
src/plugins/data/public/search/collectors/create_usage_collector.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/public/search/collectors/create_usage_collector.ts
Outdated
Show resolved
Hide resolved
lizozom
left a comment
There was a problem hiding this comment.
Overall LGTM
I would however add another event upon arriving to the management app
| useEffect(() => { | ||
| doRefresh(); | ||
| }, [doRefresh]); | ||
| plugins.data.search.usageCollector?.trackSessionsListLoaded(); |
There was a problem hiding this comment.
I think we might be able to replace this by using the sub view collector for the management app. Not sure we want to tho 🤔 https://github.com/elastic/kibana/blob/master/src/plugins/kibana_usage_collection/server/collectors/application_usage/README.md
|
@elasticmachine merge upstream |
Dosant
left a comment
There was a problem hiding this comment.
Looks goods.
Two things I'd improved:
| } | ||
|
|
||
| if (state === SearchSessionState.Restored) { | ||
| usageCollector?.trackSessionIsRestored(); |
There was a problem hiding this comment.
This is probably not the best place to put it because it is part of the tour hook.
It would make more sense to have in inside the x-pack/plugins/data_enhanced/public/search/ui/connected_search_session_indicator/connected_search_session_indicator.tsx or session_service itself (when restore) is called
Dosant
left a comment
There was a problem hiding this comment.
I made some improvements:
lukasolson#18
@lukasolson, @lizozom, could you please take a look?
Those also are not critical and we can merge this pr first and direct lukasolson#18 as a bugfix to master.
| /** | ||
| * The session indicator was disabled because of a completion timeout | ||
| */ | ||
| SESSION_INDICATOR_TOUR_DISABLED = 'sessionIndicatorTourDisabled', |
There was a problem hiding this comment.
Renamed this to SESSION_INDICATOR_SAVE_DISABLED in lukasolson#18
| if (state === SearchSessionState.Restored) { | ||
| usageCollector?.trackSessionIsRestored(); | ||
| if (!safeHas(storage, TOUR_RESTORE_STEP_KEY)) { | ||
| usageCollector?.trackSessionIndicatorTourRestored(); |
There was a problem hiding this comment.
This call here is not reliable and can be called multiple times 😮
Because of how this useEffect with searchSessionIndicatorRef is setup 😢
This probably won't happen in real life, but I noticed it in new unit tests I added here: lukasolson#18
So I put up a fix to make sure we 100% won't cause excessive tracks: lukasolson#18
|
@elasticmachine merge upstream |
Search session telemetry improvements
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Liza K <liza.katz@elastic.co> Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Summary
Part of #62964.
Adds telemetry for the following:
Checklist
For maintainers