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

Report telemetry for autocomplete #91428

Merged
merged 10 commits into from
Feb 17, 2021

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Feb 15, 2021

Summary

Added some telemetry around the data plugin

Autocomplete interactions

  • error count
  • position of selected suggestion
  • length of query used to generate the suggestions

This should allow us to analyze how often and how well users engage with our existing Autocomplete results.

Value suggestions requests

  • Autocomplete requests triggered
  • Autocomplete request sent to server (memoize cache miss)
  • Autocomplete response received
  • Autocomplete Error

Other UI components

  • query language switch
  • filter bar bulk actions

Checklist

Delete any items that are not applicable to this PR.

For maintainers

Liza K added 4 commits February 15, 2021 18:32
* error cound
* position of selected suggestion
* length of query used to generate the suggestions

Also added a couple if handly telemetry events:
* query language switch
* filter bar bulk actions
@lizozom lizozom self-assigned this Feb 16, 2021
@lizozom lizozom added Feature:Telemetry Team:AppServices v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Feb 16, 2021
@lizozom lizozom marked this pull request as ready for review February 16, 2021 13:28
@lizozom lizozom requested a review from a team as a code owner February 16, 2021 13:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

if (props.trackUiMetric) {
props.trackUiMetric(METRIC_TYPE.CLICK, `${props.appName}:filter_invertInclusion`);
}
reportUiCounter?.(METRIC_TYPE.CLICK, `filter:invert_all`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this change how we report existing metrics? Isn't it breaking as it would make those harder to analyze?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We never analyze them anyway...
I thought it was good timing for some standardization

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this was added by kibana/app #82709, #82961
I think we should ping them for reviewing these changes? In case they analyzing those.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@majagrubic would you mind taking a look?
I wanted to align the names of telemetry events. Will this break anything for you?

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Is my understanding correct here that we're no longer tracking the appName with the metric? This would make it impossible for us to track which clicks came from inside Discover for example?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@lizozom lizozom Feb 17, 2021

Choose a reason for hiding this comment

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

@majagrubic We still report the appName, I just renamed some of the events themselves and it should be easier to analyze as the appName now is in its own field

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine with us, we're not actively using these metrics yet.

@Dosant Dosant added v7.12.0 and removed v7.12 labels Feb 16, 2021
@lizozom lizozom requested a review from Dosant February 16, 2021 15:12
@lizozom lizozom requested a review from Dosant February 16, 2021 17:55
@lizozom
Copy link
Contributor Author

lizozom commented Feb 17, 2021

@elasticmachine merge upstream

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

LGTM

return await requestSuggestions(title, field, query, filters, signal);
} catch (e) {
if (!signal?.aborted) {
usageCollector?.trackError();
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think this also belongs to requestSuggestions and should be similar to usageCollector?.trackResult(); call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I didn't want to delete anything from requestSugestions.cache before the function returned.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 701 704 +3

Async chunks

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

id before after diff
data 236.3KB 225.6KB -10.6KB

Page load bundle

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

id before after diff
data 909.0KB 911.2KB +2.2KB

History

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

@lizozom lizozom requested a review from majagrubic February 17, 2021 11:27
@lizozom lizozom merged commit 98bd8e0 into elastic:master Feb 17, 2021
lizozom added a commit to lizozom/kibana that referenced this pull request Feb 17, 2021
* Report telemetry about autocomplete
* error cound
* position of selected suggestion
* length of query used to generate the suggestions

Also added a couple if handly telemetry events:
* query language switch
* filter bar bulk actions

* Fix ts

* Report the value suggestions funnel

* docs

* docs

* fix jest

* test

* code review

Co-authored-by: Kibana Machine <[email protected]>
lizozom added a commit that referenced this pull request Feb 17, 2021
* Report telemetry about autocomplete
* error cound
* position of selected suggestion
* length of query used to generate the suggestions

Also added a couple if handly telemetry events:
* query language switch
* filter bar bulk actions

* Fix ts

* Report the value suggestions funnel

* docs

* docs

* fix jest

* test

* code review

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants