[MM-57066][MM-57329] Added metrics for all notification stopping points, consolidated categories between metrics and logging (#26799)

* [MM-57066] Add metric counters for notification events

* Some small changes

* Account for Metrics() sometimes being nil

* Fix test (again)

* Fix more tests

* A few changes from testing - added success counter

* Missed a mock

* Lint

* Add feature flag for notification monitoring
Этот коммит содержится в:
Devin Binnie
2024-04-18 10:30:08 -04:00
коммит произвёл GitHub
родитель 0ce5def8e2
Коммит 02e23a3275
26 изменённых файлов: 572 добавлений и 241 удалений

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

@@ -412,11 +412,11 @@ export default class WebSocketClient {
this.sendMessage('user_update_active_status', data, callback);
}
acknowledgePostedNotification(postId: string, result: 'error' | 'not_sent' | 'unsupported' | 'success', reason?: string, postedData?: string) {
acknowledgePostedNotification(postId: string, status: string, reason?: string, postedData?: string) {
const data = {
post_id: postId,
user_agent: window.navigator.userAgent,
result,
status,
reason,
data: postedData,
};

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

@@ -221,3 +221,10 @@ export type PostInfo = {
team_display_name: string;
has_joined_team: boolean;
}
export type NotificationStatus = 'error' | 'not_sent' | 'unsupported' | 'success';
export type NotificationResult = {
status: NotificationStatus;
reason?: string;
data?: string;
}