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

feat(GMS): Adding Dashboard Usage Models #5399

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
namespace com.linkedin.dashboard

import com.linkedin.timeseries.TimeseriesAspectBase

/**
* Stats corresponding to dashboard's usage.
*
* If this aspect represents the latest snapshot of the statistics about a Dashboard, the eventGranularity field should be null.
* If this aspect represents a bucketed window of usage statistics (e.g. over a day), then the eventGranularity field should be set accordingly.
*/
@Aspect = {
"name": "dashboardUsageStatistics",
"type": "timeseries",
}
record DashboardUsageStatistics includes TimeseriesAspectBase {
/**
* The total number of times dashboard has been viewed
*/
@TimeseriesField = {}
viewsCount: optional int

/**
* The total number of dashboard executions (refreshes / syncs)
*/
@TimeseriesField = {}
executionsCount: optional int

/**
* Unique user count
*/
@TimeseriesField = {}
uniqueUserCount: optional int

/**
* Users within this bucket, with frequency counts
*/
@TimeseriesFieldCollection = {"key":"user"}
userCounts: optional array[DashboardUserUsageCounts]

/**
* The total number of times that the dashboard has been favorited
*/
@TimeseriesField = {}
favoritesCount: optional int

/**
* Last viewed at
*
* This should not be set in cases where statistics are windowed.
*/
@TimeseriesField = {}
lastViewedAt: optional long

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace com.linkedin.dashboard

import com.linkedin.common.Urn

/**
* Records a single user's usage counts for a given resource
*/
record DashboardUserUsageCounts {
/**
* The unique id of the user.
*/
user: Urn

/**
* The number of times the user has viewed the dashboard
*/
@TimeseriesField = {}
viewsCount: optional int

/**
* The number of times the user has executed (refreshed) the dashboard
*/
@TimeseriesField = {}
executionsCount: optional int

/**
* Normalized numeric metric representing user's dashboard usage -- the number of times the user executed or viewed the dashboard.
*/
@TimeseriesField = {}
usageCount: optional int

}
1 change: 1 addition & 0 deletions metadata-models/src/main/resources/entity-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ entities:
- domains
- container
- deprecation
- dashboardUsageStatistics
- name: notebook
doc: Notebook represents a combination of query, text, chart and etc. This is in BETA version
keyAspect: notebookKey
Expand Down