MM-60285 Add fresh label to channel and team switch metrics (#28100)

* Changed measureAndReport to take an object as parameters

* MM-60285 Add fresh label to channel and team switch metrics
Этот коммит содержится в:
Harrison Healey
2024-09-05 16:30:24 -04:00
коммит произвёл GitHub
родитель 8694b78cc8
Коммит 8c5f00da86
11 изменённых файлов: 87 добавлений и 26 удалений

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

@@ -49,9 +49,19 @@ func (a *App) RegisterPerformanceReport(rctx request.CTX, report *model.Performa
case model.ClientPageLoadDuration:
a.Metrics().ObserveClientPageLoadDuration(commonLabels["platform"], commonLabels["agent"], h.Value/1000)
case model.ClientChannelSwitchDuration:
a.Metrics().ObserveClientChannelSwitchDuration(commonLabels["platform"], commonLabels["agent"], h.Value/1000)
a.Metrics().ObserveClientChannelSwitchDuration(
commonLabels["platform"],
commonLabels["agent"],
h.GetLabelValue("fresh", model.AcceptedTrueFalseLabels, ""),
h.Value/1000,
)
case model.ClientTeamSwitchDuration:
a.Metrics().ObserveClientTeamSwitchDuration(commonLabels["platform"], commonLabels["agent"], h.Value/1000)
a.Metrics().ObserveClientTeamSwitchDuration(
commonLabels["platform"],
commonLabels["agent"],
h.GetLabelValue("fresh", model.AcceptedTrueFalseLabels, ""),
h.Value/1000,
)
case model.ClientRHSLoadDuration:
a.Metrics().ObserveClientRHSLoadDuration(commonLabels["platform"], commonLabels["agent"], h.Value/1000)
case model.ClientGlobalThreadsLoadDuration: