[Actionable Observability] Application usage for Alerts, Cases, Rules views#132006
[Actionable Observability] Application usage for Alerts, Cases, Rules views#132006mgiota merged 7 commits intoelastic:mainfrom
Conversation
32be57a to
eaf0a52
Compare
eaf0a52 to
7da73a7
Compare
|
@simianhacker Here's a very quick draft PR after applying what is mentioned here https://github.com/elastic/kibana/blob/main/src/plugins/kibana_usage_collection/server/collectors/application_usage/README.md. Question is how do I test the reporting of usage_collection? |
|
@afharo I did the manual testing and here's the telemetry that Kibana will send: What is considered as a click? When I click on the menu options in the Observability sidebar (for example cases or alerts), I would expect the number of clicks to increase in the subviews, but as you can see in my example above I get 0s. What get increased though are the number of clicks in the main view. Is this how it should be? I did a bit of manual testing in the security solution and I see same behavior there: |
Application Usage tracks clicks inside that component (and the minutes that component is rendered on screen). In your example, the side menu is outside the sub-views, so any clicks in it will only account for the application's general clicks. As the user interacts with any buttons inside the sub-view, the clicks counter for that specific sub-view will grow appropriately. I hope it makes sense. For tracking clicks in specific buttons (like the navigation options in the menu), you can rely on the new If you still think we should track the number of times a user enters an application/sub-view, we can extend Application Usage to track that as well :) |
|
@afharo It makes total sense, thanks for clarifying! I also clicked a few times within the respective apps and I didn't see numbers increasing, but I guess I had to wait a bit. Will do a bit more testing now.
I think first step for our team was to add basic telemetry the way we did it in this PR. @vinaychandrasekhar Do you think this is something we would be interested in adding later on? |
FYI, we report the UI usage to the server every 3 minutes to reduce the load on both ends (no need to run HTTP requests all the time). The exception is when changing tabs: we noticed that some browsers may put the timers to sleep, so we attempt to send the report as soon as the user goes to a different tab in their browser. What I mean is: if you don't want to wait 3 minutes to see the info reflected in the server, you can change to another tab in your browser and come back :) |
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @mgiota |
|
@afharo Let me know if I need to do any more changes in this PR. |
afharo
left a comment
There was a problem hiding this comment.
LGTM! Just 2 nits to make the dependency TS declaration optional to match kibana.json.
| appMountParameters: AppMountParameters; | ||
| ObservabilityPageTemplate: React.ComponentType<LazyObservabilityPageTemplateProps>; | ||
| kibanaFeatures: KibanaFeature[]; | ||
| usageCollection: UsageCollectionSetup; |
There was a problem hiding this comment.
nit: this is declared as an optional dependency
| usageCollection: UsageCollectionSetup; | |
| usageCollection?: UsageCollectionSetup; |
| data: DataPublicPluginSetup; | ||
| triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; | ||
| home?: HomePublicPluginSetup; | ||
| usageCollection: UsageCollectionSetup; |
There was a problem hiding this comment.
same as my previous comment: kibana.json declares this dependency optional. We should account for it in TS.
… views (elastic#132006) * add application usage to observability * wrap Alerts page in a TrackApplicationView component * define alerting pages in a config file * add UsageCollectionSetup contract * pass useCollection in the renderApp * fix failing tests * application usage for cases and rules
|
I'm putting here the manual steps needed to test telemetry:
|
Fixes #129339
Fixes #129340
Fixes #129341