Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting/telemetry] Add 'statuses' object to usage to show status counts by jobType & appType #63922

Merged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { uniq } from 'lodash';
import { CSV_JOB_TYPE, PDF_JOB_TYPE, PNG_JOB_TYPE } from '../../common/constants';
import { AvailableTotal, FeatureAvailabilityMap, RangeStats, ExportType } from './types';
import { AvailableTotal, ExportType, FeatureAvailabilityMap, RangeStats } from './types';

function getForFeature(
range: Partial<RangeStats>,
Expand Down Expand Up @@ -47,6 +47,7 @@ export const decorateRangeStats = (
const {
_all: rangeAll,
status: rangeStatus,
statuses: rangeStatusByApp,
[PDF_JOB_TYPE]: rangeStatsPdf,
...rangeStatsBasic
} = rangeStats;
Expand All @@ -73,6 +74,7 @@ export const decorateRangeStats = (
const resultStats = {
_all: rangeAll || 0,
status: { completed: 0, failed: 0, ...rangeStatus },
statuses: rangeStatusByApp,
...rangePdf,
...rangeBasic,
} as RangeStats;
Expand Down
Loading
Loading