Skip to content

Conversation

@streamich
Copy link
Contributor

@streamich streamich commented Nov 30, 2020

Summary

Closes #78402

This PR integrate .telemetry() from PersistedState service to track the following metrics.

  • Use .telemetry() method of persistable state service which is wired into ui_actions_enhanced.
    • Track if saved object has a drilldown.
    • Track how many drilldowns saved objects have.
    • Track what type of drilldown are used.

Checklist

For maintainers


Release note

Adds telemetry tracking for dynamic UI Actions. Now number of drilldowns used on dashboard and type of the drilldowns is aggregated and reported using telemetry.


Documentation

Dynamic Actions Telemetry

Dynamic actions (drilldowns) report telemetry. Below is the summary of dynamic action metrics that are reported using telemetry.

Dynamic action count

Total count of dynamic actions (drilldowns) on a saved object.

dynamicActions.count

Count by factory ID

Count of active dynamic actions (drilldowns) on a saved object by factory ID (drilldown type).

dynamicActions.actions.<factory_id>.count

For example:

dynamicActions.actions.DASHBOARD_TO_DASHBOARD_DRILLDOWN.count
dynamicActions.actions.URL_DRILLDOWN.count

Count by trigger

Count of active dynamic actions (drilldowns) on a saved object by a trigger to which they are attached.

dynamicActions.triggers.<trigger>.count

For example:

dynamicActions.triggers.VALUE_CLICK_TRIGGER.count
dynamicActions.triggers.RANGE_SELECT_TRIGGER.count

Count by factory and trigger

Count of active dynamic actions (drilldowns) on a saved object by a factory ID and trigger ID.

dynamicActions.action_triggers.<factory_id>_<trigger>.count

For example:

dynamicActions.action_triggers.DASHBOARD_TO_DASHBOARD_DRILLDOWN_VALUE_CLICK_TRIGGER.count
dynamicActions.action_triggers.DASHBOARD_TO_DASHBOARD_DRILLDOWN_RANGE_SELECT_TRIGGER.count
dynamicActions.action_triggers.URL_DRILLDOWN_VALUE_CLICK_TRIGGER.count

Factory metrics

Each dynamic action factory (drilldown type) can report its own stats, which is
done using the .telemetry() method on dynamic action factories.

@streamich streamich marked this pull request as ready for review December 1, 2020 14:04
@streamich streamich requested a review from a team as a code owner December 1, 2020 14:04
@streamich streamich added Feature:Drilldowns Embeddable panel Drilldowns Feature:UIActions UI actions. These are client side only, not related to the server side actions.. release_note:skip Skip the PR/issue when compiling release notes review Team:AppServices v7.11.0 v8.0.0 labels Dec 1, 2020
@elasticmachine
Copy link
Contributor

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

@streamich streamich requested a review from ppisljar December 1, 2020 14:05
@streamich streamich changed the title feat: 🎸 set up telemetry for UiActions Telemetry for Dyanmic Actions (Drilldowns) Dec 1, 2020
@streamich streamich added release_note:roadmap and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 1, 2020
Copy link
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

the telemetry function should work like a reduce, where your stats argument is the accumulator, and i think we should do that on inner layers as well.

@streamich streamich requested a review from ppisljar December 2, 2020 13:15
Copy link
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

code LGTM

@streamich streamich merged commit cc341b3 into elastic:master Dec 2, 2020
streamich added a commit that referenced this pull request Dec 2, 2020
* feat: 🎸 set up telemetry for UiActions

* feat: 🎸 improve ui_actions_enhanced collector

* feat: 🎸 namespace ui actions telemetry stats

* refactor: 💡 improve dynamic actions collector setup

* feat: 🎸 add tests for dynamicActionsCollector

* feat: 🎸 collect dynamic action trigger statistics

* refactor: 💡 standartize metric naming

* feat: 🎸 aggregate action x trigger counts

* test: 💍 add tests for factory stats

* docs: ✏️ add ui actions enhanced telemetry docs

* fix: 🐛 revert type change

* refactor: 💡 make dynamic action stats global

* refactor: 💡 use global telemetry stats in action factories

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@elastic-jb elastic-jb changed the title Telemetry for Dyanmic Actions (Drilldowns) Telemetry for Dynamic Actions (Drilldowns) Apr 28, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Apr 28, 2021

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [2ad3d2b]

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Drilldowns Embeddable panel Drilldowns Feature:UIActions UI actions. These are client side only, not related to the server side actions.. review v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry for Drilldowns

4 participants