Dashboard favorites telemetry#190706
Conversation
…kibana into d/2024-08-14-favorites-telemetry
| mappings: { | ||
| dynamic: false, | ||
| properties: {}, | ||
| properties: { |
There was a problem hiding this comment.
We didn't need these mappings for the feature, but, unfortunately, I didn't know that we would need them for the snapshot telemetry. I am not sure if there is another better way
the object schema stays the same, but we add existing fields to the mapping
There was a problem hiding this comment.
It's been my experience as well that it's sometimes necessary to add mappings just for the sake of being able to collect snapshot telemetry.
| number_of_favorites: { | ||
| type: 'long', | ||
| script: { | ||
| source: "emit(doc['favorites.favoriteIds'].length)", |
There was a problem hiding this comment.
Not sure if this is the best way, but I like how clean it is to get sum, avg, max.
I've also tried value_count aggregation which works well for total, but haven't figure how it can be used for avg and max
There was a problem hiding this comment.
If you need other alternatives to consider, there is also the stats aggregation.
Running the aggregation on a runtime field seems like a perfect idea for this.
There was a problem hiding this comment.
Thanks, I updated to stats
…kibana into d/2024-08-14-favorites-telemetry
|
/ci |
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
| "../../../typings/**/*", | ||
| "schema/oss_plugins.json", | ||
| "schema/oss_root.json", | ||
| "schema/kbn_packages.json" |
|
@elasticmachine merge upstream |
| type: 'long', | ||
| _meta: { | ||
| description: | ||
| 'Total unique users+spaces that have favorited an object of this type in this deployment', |
There was a problem hiding this comment.
I don't follow what users+spaces means. Does it mean users per space?
|
|
||
| export function registerFavoritesUsageCollection({ | ||
| core, | ||
| logger, |
There was a problem hiding this comment.
Should logger be used for anything?
tsullivan
left a comment
There was a problem hiding this comment.
LGTM
Added a few conversational comments
…vorites-telemetry # Conflicts: # src/plugins/content_management/tsconfig.json
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Async chunks
Saved Objects .kibana field count
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |


Summary
Add telemetry to favorites feature #189285
Unfortunately, for snapshot telemetry, I had to add fields to kibana mapping. We didn't need them for a feature, but I didn't realize that will have to add them to a mapping. Not sure if there is a better way