From 630d0a1bf5897fff203cb07e426223f55dcc882d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Jul 2022 15:43:21 +0200 Subject: Introduce experimental telemetry --- shared/models/server/server-stats.model.ts | 33 ++++++------------------------ 1 file changed, 6 insertions(+), 27 deletions(-) (limited to 'shared') diff --git a/shared/models/server/server-stats.model.ts b/shared/models/server/server-stats.model.ts index b1dcf2065..82f5a737f 100644 --- a/shared/models/server/server-stats.model.ts +++ b/shared/models/server/server-stats.model.ts @@ -1,5 +1,10 @@ +import { ActivityType } from '../activitypub' import { VideoRedundancyStrategyWithManual } from '../redundancy' -export interface ServerStats { + +type ActivityPubMessagesSuccess = Record<`totalActivityPub${ActivityType}MessagesSuccesses`, number> +type ActivityPubMessagesErrors = Record<`totalActivityPub${ActivityType}MessagesErrors`, number> + +export interface ServerStats extends ActivityPubMessagesSuccess, ActivityPubMessagesErrors { totalUsers: number totalDailyActiveUsers: number totalWeeklyActiveUsers: number @@ -29,32 +34,6 @@ export interface ServerStats { totalActivityPubMessagesSuccesses: number totalActivityPubMessagesErrors: number - totalActivityPubCreateMessagesSuccesses: number - totalActivityPubUpdateMessagesSuccesses: number - totalActivityPubDeleteMessagesSuccesses: number - totalActivityPubFollowMessagesSuccesses: number - totalActivityPubAcceptMessagesSuccesses: number - totalActivityPubRejectMessagesSuccesses: number - totalActivityPubAnnounceMessagesSuccesses: number - totalActivityPubUndoMessagesSuccesses: number - totalActivityPubLikeMessagesSuccesses: number - totalActivityPubDislikeMessagesSuccesses: number - totalActivityPubFlagMessagesSuccesses: number - totalActivityPubViewMessagesSuccesses: number - - totalActivityPubCreateMessagesErrors: number - totalActivityPubUpdateMessagesErrors: number - totalActivityPubDeleteMessagesErrors: number - totalActivityPubFollowMessagesErrors: number - totalActivityPubAcceptMessagesErrors: number - totalActivityPubRejectMessagesErrors: number - totalActivityPubAnnounceMessagesErrors: number - totalActivityPubUndoMessagesErrors: number - totalActivityPubLikeMessagesErrors: number - totalActivityPubDislikeMessagesErrors: number - totalActivityPubFlagMessagesErrors: number - totalActivityPubViewMessagesErrors: number - activityPubMessagesProcessedPerSecond: number totalActivityPubMessagesWaiting: number } -- cgit v1.2.3