[MM-25385] Add group_count_with_allow_reference telemetry (#14614)

* MM-25385 Add group_count_with_allow_reference telemetry

* Add store layers

* Fix tests

* Fix linting
Этот коммит содержится в:
Farhan Munshi
2020-05-22 10:56:15 -04:00
коммит произвёл GitHub
родитель 33bfebc797
Коммит b0d74c4e40
7 изменённых файлов: 118 добавлений и 11 удалений

Просмотреть файл

@@ -1018,14 +1018,20 @@ func (a *App) trackGroups() {
mlog.Error(err.Error())
}
groupCountWithAllowReference, err := a.Srv().Store.Group().GroupCountWithAllowReference()
if err != nil {
mlog.Error(err.Error())
}
a.SendDiagnostic(TRACK_GROUPS, map[string]interface{}{
"group_count": groupCount,
"group_team_count": groupTeamCount,
"group_channel_count": groupChannelCount,
"group_synced_team_count": groupSyncedTeamCount,
"group_synced_channel_count": groupSyncedChannelCount,
"group_member_count": groupMemberCount,
"distinct_group_member_count": distinctGroupMemberCount,
"group_count": groupCount,
"group_team_count": groupTeamCount,
"group_channel_count": groupChannelCount,
"group_synced_team_count": groupSyncedTeamCount,
"group_synced_channel_count": groupSyncedChannelCount,
"group_member_count": groupMemberCount,
"distinct_group_member_count": distinctGroupMemberCount,
"group_count_with_allow_reference": groupCountWithAllowReference,
})
}