Adding telemetry for slash commands, and webhook counts. (#10202)
Этот коммит содержится в:
коммит произвёл
Lev
родитель
7c677b6196
Коммит
51ef1ee32f
@@ -133,6 +133,9 @@ func (a *App) trackActivity() {
|
|||||||
var deletedPublicChannelCount int64
|
var deletedPublicChannelCount int64
|
||||||
var deletedPrivateChannelCount int64
|
var deletedPrivateChannelCount int64
|
||||||
var postsCount int64
|
var postsCount int64
|
||||||
|
var slashCommandsCount int64
|
||||||
|
var incomingWebhooksCount int64
|
||||||
|
var outgoingWebhooksCount int64
|
||||||
|
|
||||||
dailyActiveChan := a.Srv.Store.User().AnalyticsActiveCount(DAY_MILLISECONDS)
|
dailyActiveChan := a.Srv.Store.User().AnalyticsActiveCount(DAY_MILLISECONDS)
|
||||||
monthlyActiveChan := a.Srv.Store.User().AnalyticsActiveCount(MONTH_MILLISECONDS)
|
monthlyActiveChan := a.Srv.Store.User().AnalyticsActiveCount(MONTH_MILLISECONDS)
|
||||||
@@ -181,6 +184,18 @@ func (a *App) trackActivity() {
|
|||||||
postsCount = pcr.Data.(int64)
|
postsCount = pcr.Data.(int64)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if scc := <-a.Srv.Store.Command().AnalyticsCommandCount(""); scc.Err == nil {
|
||||||
|
slashCommandsCount = scc.Data.(int64)
|
||||||
|
}
|
||||||
|
|
||||||
|
if iwc := <-a.Srv.Store.Webhook().AnalyticsIncomingCount(""); iwc.Err == nil {
|
||||||
|
incomingWebhooksCount = iwc.Data.(int64)
|
||||||
|
}
|
||||||
|
|
||||||
|
if owc := <-a.Srv.Store.Webhook().AnalyticsOutgoingCount(""); owc.Err == nil {
|
||||||
|
outgoingWebhooksCount = owc.Data.(int64)
|
||||||
|
}
|
||||||
|
|
||||||
a.SendDiagnostic(TRACK_ACTIVITY, map[string]interface{}{
|
a.SendDiagnostic(TRACK_ACTIVITY, map[string]interface{}{
|
||||||
"registered_users": userCount,
|
"registered_users": userCount,
|
||||||
"active_users_daily": activeUsersDailyCount,
|
"active_users_daily": activeUsersDailyCount,
|
||||||
@@ -193,6 +208,9 @@ func (a *App) trackActivity() {
|
|||||||
"public_channels_deleted": deletedPublicChannelCount,
|
"public_channels_deleted": deletedPublicChannelCount,
|
||||||
"private_channels_deleted": deletedPrivateChannelCount,
|
"private_channels_deleted": deletedPrivateChannelCount,
|
||||||
"posts": postsCount,
|
"posts": postsCount,
|
||||||
|
"slash_commands": slashCommandsCount,
|
||||||
|
"incoming_webhooks": incomingWebhooksCount,
|
||||||
|
"outgoing_webhooks": outgoingWebhooksCount,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user