@abyss-project/monitor 1.0.51 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/hourly-metrics.api.d.ts +4 -0
- package/dist/api/hourly-metrics.api.js +16 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/types/interface/api/index.d.ts +4 -0
- package/dist/types/interface/api/index.js +4 -0
- package/dist/types/interface/api/requests/application.admin.request.d.ts +5 -0
- package/dist/types/interface/api/requests/application.request.d.ts +9 -0
- package/dist/types/interface/api/requests/hourly-metrics.request.d.ts +28 -0
- package/dist/types/interface/api/requests/hourly-metrics.request.js +2 -0
- package/dist/types/interface/api/requests/metrics.admin.request.d.ts +13 -0
- package/dist/types/interface/api/requests/metrics.admin.request.js +2 -0
- package/dist/types/interface/api/responses/application.admin.response.d.ts +2 -1
- package/dist/types/interface/api/responses/application.response.d.ts +2 -1
- package/dist/types/interface/api/responses/hourly-metrics.response.d.ts +90 -0
- package/dist/types/interface/api/responses/hourly-metrics.response.js +2 -0
- package/dist/types/interface/api/responses/metrics.admin.response.d.ts +19 -0
- package/dist/types/interface/api/responses/metrics.admin.response.js +2 -0
- package/dist/types/interface/api/responses/report.admin.response.d.ts +45 -43
- package/dist/types/interface/index.d.ts +2 -0
- package/dist/types/interface/index.js +2 -0
- package/dist/types/interface/models/application-hourly-metrics.model.d.ts +14 -0
- package/dist/types/interface/models/application-hourly-metrics.model.js +2 -0
- package/dist/types/interface/models/application-lifetime-metrics.model.d.ts +8 -0
- package/dist/types/interface/models/application-lifetime-metrics.model.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IGetHourlyMetricsParams, IGetHourlyMetricsQuery, IGetHourlyMetricsResponse, IGetAggregatedHourlyMetricsParams, IGetAggregatedHourlyMetricsQuery, IGetAggregatedHourlyMetricsResponse, IGetHourlyMetricsComparisonParams, IGetHourlyMetricsComparisonQuery, IGetHourlyMetricsComparisonResponse } from '../types';
|
|
2
|
+
export declare const getHourlyMetrics: (params: IGetHourlyMetricsParams, query: IGetHourlyMetricsQuery) => Promise<IGetHourlyMetricsResponse>;
|
|
3
|
+
export declare const getAggregatedHourlyMetrics: (params: IGetAggregatedHourlyMetricsParams, query: IGetAggregatedHourlyMetricsQuery) => Promise<IGetAggregatedHourlyMetricsResponse>;
|
|
4
|
+
export declare const getHourlyMetricsComparison: (params: IGetHourlyMetricsComparisonParams, query: IGetHourlyMetricsComparisonQuery) => Promise<IGetHourlyMetricsComparisonResponse>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHourlyMetricsComparison = exports.getAggregatedHourlyMetrics = exports.getHourlyMetrics = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getHourlyMetrics = async (params, query) => {
|
|
6
|
+
return (await __1.AbyssMonitorCore.axios.get(`metrics/hourly/${params.projectId}`, { params: query })).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getHourlyMetrics = getHourlyMetrics;
|
|
9
|
+
const getAggregatedHourlyMetrics = async (params, query) => {
|
|
10
|
+
return (await __1.AbyssMonitorCore.axios.get(`metrics/hourly/${params.projectId}/aggregated`, { params: query })).data;
|
|
11
|
+
};
|
|
12
|
+
exports.getAggregatedHourlyMetrics = getAggregatedHourlyMetrics;
|
|
13
|
+
const getHourlyMetricsComparison = async (params, query) => {
|
|
14
|
+
return (await __1.AbyssMonitorCore.axios.get(`metrics/hourly/${params.projectId}/comparison`, { params: query })).data;
|
|
15
|
+
};
|
|
16
|
+
exports.getHourlyMetricsComparison = getHourlyMetricsComparison;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ export * from './application-webhook-history.admin.api';
|
|
|
16
16
|
export * from './application-sentinel.api';
|
|
17
17
|
export * from './application-sentinel.admin.api';
|
|
18
18
|
export * from './metrics.api';
|
|
19
|
+
export * from './hourly-metrics.api';
|
|
19
20
|
export * from './report.admin.api';
|
|
20
21
|
export * from './infrastructure.admin.api';
|
package/dist/api/index.js
CHANGED
|
@@ -32,5 +32,6 @@ __exportStar(require("./application-webhook-history.admin.api"), exports);
|
|
|
32
32
|
__exportStar(require("./application-sentinel.api"), exports);
|
|
33
33
|
__exportStar(require("./application-sentinel.admin.api"), exports);
|
|
34
34
|
__exportStar(require("./metrics.api"), exports);
|
|
35
|
+
__exportStar(require("./hourly-metrics.api"), exports);
|
|
35
36
|
__exportStar(require("./report.admin.api"), exports);
|
|
36
37
|
__exportStar(require("./infrastructure.admin.api"), exports);
|
|
@@ -19,6 +19,8 @@ export * from './requests/application-webhook-history.request';
|
|
|
19
19
|
export * from './requests/application-sentinel.admin.request';
|
|
20
20
|
export * from './requests/application-sentinel.request';
|
|
21
21
|
export * from './requests/metrics.request';
|
|
22
|
+
export * from './requests/metrics.admin.request';
|
|
23
|
+
export * from './requests/hourly-metrics.request';
|
|
22
24
|
export * from './requests/report.admin.request';
|
|
23
25
|
export * from './requests/infrastructure.admin.request';
|
|
24
26
|
export * from './responses/application.response';
|
|
@@ -39,5 +41,7 @@ export * from './responses/application-webhook-history.response';
|
|
|
39
41
|
export * from './responses/application-sentinel.admin.response';
|
|
40
42
|
export * from './responses/application-sentinel.response';
|
|
41
43
|
export * from './responses/metrics.response';
|
|
44
|
+
export * from './responses/metrics.admin.response';
|
|
45
|
+
export * from './responses/hourly-metrics.response';
|
|
42
46
|
export * from './responses/report.admin.response';
|
|
43
47
|
export * from './responses/infrastructure.admin.response';
|
|
@@ -35,6 +35,8 @@ __exportStar(require("./requests/application-webhook-history.request"), exports)
|
|
|
35
35
|
__exportStar(require("./requests/application-sentinel.admin.request"), exports);
|
|
36
36
|
__exportStar(require("./requests/application-sentinel.request"), exports);
|
|
37
37
|
__exportStar(require("./requests/metrics.request"), exports);
|
|
38
|
+
__exportStar(require("./requests/metrics.admin.request"), exports);
|
|
39
|
+
__exportStar(require("./requests/hourly-metrics.request"), exports);
|
|
38
40
|
__exportStar(require("./requests/report.admin.request"), exports);
|
|
39
41
|
__exportStar(require("./requests/infrastructure.admin.request"), exports);
|
|
40
42
|
__exportStar(require("./responses/application.response"), exports);
|
|
@@ -55,5 +57,7 @@ __exportStar(require("./responses/application-webhook-history.response"), export
|
|
|
55
57
|
__exportStar(require("./responses/application-sentinel.admin.response"), exports);
|
|
56
58
|
__exportStar(require("./responses/application-sentinel.response"), exports);
|
|
57
59
|
__exportStar(require("./responses/metrics.response"), exports);
|
|
60
|
+
__exportStar(require("./responses/metrics.admin.response"), exports);
|
|
61
|
+
__exportStar(require("./responses/hourly-metrics.response"), exports);
|
|
58
62
|
__exportStar(require("./responses/report.admin.response"), exports);
|
|
59
63
|
__exportStar(require("./responses/infrastructure.admin.response"), exports);
|
|
@@ -6,6 +6,11 @@ export interface IResetSecretPublishTokenApplicationAdminParams {
|
|
|
6
6
|
applicationId: string;
|
|
7
7
|
}
|
|
8
8
|
export type IPaginateApplicationAdminQuery = QueryPaginate;
|
|
9
|
+
export interface IPaginateHourlyMetricsApplicationAdminQuery extends QueryPaginate {
|
|
10
|
+
applicationId: string;
|
|
11
|
+
startDate?: Date;
|
|
12
|
+
endDate?: Date;
|
|
13
|
+
}
|
|
9
14
|
export type ICreateApplicationAdminBody = {
|
|
10
15
|
projectId: string;
|
|
11
16
|
externalApplicationId: string;
|
|
@@ -53,3 +53,12 @@ export interface ICallPerControllerAnalyticsApplicationQuery {
|
|
|
53
53
|
dateValueBefore?: Date;
|
|
54
54
|
dateValueAfter?: Date;
|
|
55
55
|
}
|
|
56
|
+
export interface IPaginateHourlyMetricsApplicationParams {
|
|
57
|
+
applicationId: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IPaginateHourlyMetricsApplicationQuery {
|
|
60
|
+
page?: number;
|
|
61
|
+
limit?: number;
|
|
62
|
+
startDate?: Date;
|
|
63
|
+
endDate?: Date;
|
|
64
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IGetHourlyMetricsParams {
|
|
2
|
+
projectId: string;
|
|
3
|
+
}
|
|
4
|
+
export interface IGetHourlyMetricsQuery {
|
|
5
|
+
applicationIds?: string[];
|
|
6
|
+
startDate?: Date;
|
|
7
|
+
endDate?: Date;
|
|
8
|
+
limit?: number;
|
|
9
|
+
offset?: number;
|
|
10
|
+
granularity?: 'hour' | 'day' | 'week' | 'month';
|
|
11
|
+
}
|
|
12
|
+
export interface IGetAggregatedHourlyMetricsParams {
|
|
13
|
+
projectId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IGetAggregatedHourlyMetricsQuery {
|
|
16
|
+
applicationIds?: string[];
|
|
17
|
+
startDate?: Date;
|
|
18
|
+
endDate?: Date;
|
|
19
|
+
}
|
|
20
|
+
export interface IGetHourlyMetricsComparisonParams {
|
|
21
|
+
projectId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IGetHourlyMetricsComparisonQuery {
|
|
24
|
+
applicationIds: string[];
|
|
25
|
+
startDate?: Date;
|
|
26
|
+
endDate?: Date;
|
|
27
|
+
metrics?: string[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IFillLifetimeMetricsAdminBody {
|
|
2
|
+
applicationIds?: string[];
|
|
3
|
+
force?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IFillHourlyMetricsAdminBody {
|
|
6
|
+
applicationIds?: string[];
|
|
7
|
+
days?: number;
|
|
8
|
+
force?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface IAggregateHourAdminBody {
|
|
11
|
+
applicationIds?: string[];
|
|
12
|
+
applicationCronTaskHistoryId?: string;
|
|
13
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { IResponse, IApplication, BasePaginate } from '../..';
|
|
1
|
+
import { IResponse, IApplication, BasePaginate, IApplicationHourlyMetrics } from '../..';
|
|
2
2
|
export interface IGetApplicationAdminData {
|
|
3
3
|
application: IApplication;
|
|
4
4
|
}
|
|
5
5
|
export type IGetApplicationAdminResponse = IResponse<IGetApplicationAdminData>;
|
|
6
6
|
export type IPaginateApplicationAdminResponse = IResponse<BasePaginate<IApplication>>;
|
|
7
|
+
export type IPaginateHourlyMetricsApplicationAdminResponse = IResponse<BasePaginate<IApplicationHourlyMetrics>>;
|
|
7
8
|
export interface IResetSecretPublishTokenApplicationAdminData {
|
|
8
9
|
application: IApplication;
|
|
9
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IResponse, IApplication } from '../..';
|
|
1
|
+
import { IResponse, IApplication, BasePaginate, IApplicationHourlyMetrics } from '../..';
|
|
2
2
|
import { APIMethod } from '../../../enum';
|
|
3
3
|
export interface IGetApplicationData {
|
|
4
4
|
application: IApplication;
|
|
@@ -127,3 +127,4 @@ export interface ICallPerControllerAnalyticsApplicationData {
|
|
|
127
127
|
}[];
|
|
128
128
|
}
|
|
129
129
|
export type ICallPerControllerAnalyticsApplicationResponse = IResponse<ICallPerControllerAnalyticsApplicationData>;
|
|
130
|
+
export type IPaginateHourlyMetricsApplicationResponse = IResponse<BasePaginate<IApplicationHourlyMetrics>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { IResponse, IApplicationHourlyMetrics } from '../..';
|
|
2
|
+
export interface IHourlyMetricsRecord extends Omit<IApplicationHourlyMetrics, 'application'> {
|
|
3
|
+
}
|
|
4
|
+
export interface IAggregatedMetricsSummary {
|
|
5
|
+
totalRequests: number;
|
|
6
|
+
totalHttpErrors: number;
|
|
7
|
+
totalHttpWarnings: number;
|
|
8
|
+
avgResponseTime: number;
|
|
9
|
+
errorRate: number;
|
|
10
|
+
availabilityRate: number;
|
|
11
|
+
totalLogs: number;
|
|
12
|
+
totalCronTasks: number;
|
|
13
|
+
successfulCronTasks: number;
|
|
14
|
+
failedCronTasks: number;
|
|
15
|
+
totalEvents: number;
|
|
16
|
+
totalWebhooks: number;
|
|
17
|
+
successfulWebhooks: number;
|
|
18
|
+
failedWebhooks: number;
|
|
19
|
+
totalSentinelChecks: number;
|
|
20
|
+
successfulSentinelChecks: number;
|
|
21
|
+
failedSentinelChecks: number;
|
|
22
|
+
avgCpuPercent: number | null;
|
|
23
|
+
maxCpuPercent: number | null;
|
|
24
|
+
avgMemoryPercent: number | null;
|
|
25
|
+
maxMemoryPercent: number | null;
|
|
26
|
+
maxMemoryBytes: number | null;
|
|
27
|
+
logsByLevel: Record<number, number>;
|
|
28
|
+
topErrorEndpoints: Array<{
|
|
29
|
+
endpoint: string;
|
|
30
|
+
count: number;
|
|
31
|
+
}>;
|
|
32
|
+
topEvents: Array<{
|
|
33
|
+
name: string;
|
|
34
|
+
count: number;
|
|
35
|
+
}>;
|
|
36
|
+
allStatusCodes: Array<{
|
|
37
|
+
statusCode: number;
|
|
38
|
+
count: number;
|
|
39
|
+
}>;
|
|
40
|
+
errorsByStatusCode: Array<{
|
|
41
|
+
statusCode: number;
|
|
42
|
+
count: number;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
export interface IMetricsTimeSeriesPoint {
|
|
46
|
+
timestamp: string;
|
|
47
|
+
value: number;
|
|
48
|
+
}
|
|
49
|
+
export interface IMetricsTimeSeries {
|
|
50
|
+
metricName: string;
|
|
51
|
+
applicationId: string;
|
|
52
|
+
data: IMetricsTimeSeriesPoint[];
|
|
53
|
+
}
|
|
54
|
+
export interface IGetHourlyMetricsData {
|
|
55
|
+
metricsByApplication: Record<string, IHourlyMetricsRecord[]>;
|
|
56
|
+
totalByApplication: Record<string, number>;
|
|
57
|
+
periodStart: string;
|
|
58
|
+
periodEnd: string;
|
|
59
|
+
}
|
|
60
|
+
export type IGetHourlyMetricsResponse = IResponse<IGetHourlyMetricsData>;
|
|
61
|
+
export interface IGetAggregatedHourlyMetricsData {
|
|
62
|
+
aggregatedByApplication: Record<string, IAggregatedMetricsSummary>;
|
|
63
|
+
overallAggregated: IAggregatedMetricsSummary;
|
|
64
|
+
periodStart: string;
|
|
65
|
+
periodEnd: string;
|
|
66
|
+
hoursInPeriod: number;
|
|
67
|
+
}
|
|
68
|
+
export type IGetAggregatedHourlyMetricsResponse = IResponse<IGetAggregatedHourlyMetricsData>;
|
|
69
|
+
export interface IApplicationMetricsComparison {
|
|
70
|
+
applicationId: string;
|
|
71
|
+
aggregated: IAggregatedMetricsSummary;
|
|
72
|
+
trends: {
|
|
73
|
+
requests: IMetricsTimeSeriesPoint[];
|
|
74
|
+
errors: IMetricsTimeSeriesPoint[];
|
|
75
|
+
responseTime: IMetricsTimeSeriesPoint[];
|
|
76
|
+
availability: IMetricsTimeSeriesPoint[];
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface IGetHourlyMetricsComparisonData {
|
|
80
|
+
applications: IApplicationMetricsComparison[];
|
|
81
|
+
periodStart: string;
|
|
82
|
+
periodEnd: string;
|
|
83
|
+
}
|
|
84
|
+
export type IGetHourlyMetricsComparisonResponse = IResponse<IGetHourlyMetricsComparisonData>;
|
|
85
|
+
export interface IGetMetricsTimeSeriesData {
|
|
86
|
+
series: IMetricsTimeSeries[];
|
|
87
|
+
periodStart: string;
|
|
88
|
+
periodEnd: string;
|
|
89
|
+
}
|
|
90
|
+
export type IGetMetricsTimeSeriesResponse = IResponse<IGetMetricsTimeSeriesData>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IResponse } from '../..';
|
|
2
|
+
export interface IFillLifetimeMetricsData {
|
|
3
|
+
success: boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
requestId: string;
|
|
6
|
+
}
|
|
7
|
+
export type IFillLifetimeMetricsAdminResponse = IResponse<IFillLifetimeMetricsData>;
|
|
8
|
+
export interface IFillHourlyMetricsData {
|
|
9
|
+
success: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
requestId: string;
|
|
12
|
+
}
|
|
13
|
+
export type IFillHourlyMetricsAdminResponse = IResponse<IFillHourlyMetricsData>;
|
|
14
|
+
export interface IAggregateHourData {
|
|
15
|
+
success: boolean;
|
|
16
|
+
message: string;
|
|
17
|
+
requestId: string;
|
|
18
|
+
}
|
|
19
|
+
export type IAggregateHourAdminResponse = IResponse<IAggregateHourData>;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { LogLevel } from '../../../enum';
|
|
2
|
+
export interface CoreLifetimeMetrics {
|
|
3
|
+
totalRequests: number;
|
|
4
|
+
totalHttpErrors: number;
|
|
5
|
+
totalHttpWarnings: number;
|
|
6
|
+
totalLogs: number;
|
|
7
|
+
totalCronTasks: number;
|
|
8
|
+
successfulCronTasks: number;
|
|
9
|
+
failedCronTasks: number;
|
|
10
|
+
totalEvents: number;
|
|
11
|
+
totalWebhooks: number;
|
|
12
|
+
successfulWebhooks: number;
|
|
13
|
+
failedWebhooks: number;
|
|
14
|
+
totalSentinelChecks: number;
|
|
15
|
+
successfulSentinelChecks: number;
|
|
16
|
+
failedSentinelChecks: number;
|
|
17
|
+
logsByLevel: Record<number, number>;
|
|
18
|
+
}
|
|
19
|
+
export interface ComputedMetrics {
|
|
20
|
+
averageResponseTime: number;
|
|
21
|
+
mostUsedEndpoint: string;
|
|
22
|
+
errorRate: number;
|
|
23
|
+
availabilityRate: number;
|
|
24
|
+
}
|
|
2
25
|
export interface RequestsByPeriod {
|
|
3
26
|
period: string;
|
|
4
27
|
count: number;
|
|
@@ -7,6 +30,10 @@ export interface ErrorsByStatusCode {
|
|
|
7
30
|
statusCode: number;
|
|
8
31
|
count: number;
|
|
9
32
|
}
|
|
33
|
+
export interface AllStatusCodes {
|
|
34
|
+
statusCode: number;
|
|
35
|
+
count: number;
|
|
36
|
+
}
|
|
10
37
|
export interface TopErrorEndpoint {
|
|
11
38
|
endpoint: string;
|
|
12
39
|
count: number;
|
|
@@ -16,10 +43,6 @@ export interface LogsByPeriod {
|
|
|
16
43
|
level: LogLevel;
|
|
17
44
|
count: number;
|
|
18
45
|
}
|
|
19
|
-
export interface LogsByLevel {
|
|
20
|
-
level: LogLevel;
|
|
21
|
-
count: number;
|
|
22
|
-
}
|
|
23
46
|
export interface TopEvent {
|
|
24
47
|
name: string;
|
|
25
48
|
count: number;
|
|
@@ -28,50 +51,29 @@ export interface EventsByPeriod {
|
|
|
28
51
|
period: string;
|
|
29
52
|
count: number;
|
|
30
53
|
}
|
|
31
|
-
export interface
|
|
32
|
-
totalRequests: number;
|
|
33
|
-
totalErrors: number;
|
|
34
|
-
totalWarnings: number;
|
|
35
|
-
totalLogs: number;
|
|
36
|
-
totalCronTasks: number;
|
|
37
|
-
successfulCronTasks: number;
|
|
38
|
-
failedCronTasks: number;
|
|
39
|
-
totalEvents: number;
|
|
40
|
-
totalWebhooks: number;
|
|
41
|
-
successfulWebhooks: number;
|
|
42
|
-
failedWebhooks: number;
|
|
43
|
-
totalSentinelChecks: number;
|
|
44
|
-
successfulSentinelChecks: number;
|
|
45
|
-
failedSentinelChecks: number;
|
|
46
|
-
logsByLevel: Array<LogsByLevel>;
|
|
47
|
-
}
|
|
48
|
-
export interface ApplicationMetrics {
|
|
49
|
-
totalRequests: number;
|
|
50
|
-
totalErrors: number;
|
|
51
|
-
totalWarnings: number;
|
|
52
|
-
averageResponseTime: number;
|
|
53
|
-
peakRequestsPerDay: number;
|
|
54
|
-
mostUsedEndpoint: string;
|
|
55
|
-
errorRate: number;
|
|
56
|
-
availabilityRate: number;
|
|
57
|
-
requestsByPeriod: Array<RequestsByPeriod>;
|
|
54
|
+
export interface MetricsBreakdowns {
|
|
58
55
|
errorsByStatusCode: Array<ErrorsByStatusCode>;
|
|
56
|
+
allStatusCodes: Array<AllStatusCodes>;
|
|
59
57
|
topErrorEndpoints: Array<TopErrorEndpoint>;
|
|
60
|
-
totalLogs: number;
|
|
61
|
-
totalCronTasks: number;
|
|
62
|
-
successfulCronTasks: number;
|
|
63
|
-
failedCronTasks: number;
|
|
64
|
-
totalEvents: number;
|
|
65
58
|
topEvents: Array<TopEvent>;
|
|
59
|
+
}
|
|
60
|
+
export interface ApplicationStatsMetrics {
|
|
61
|
+
avgCpuPercent: number | null;
|
|
62
|
+
minCpuPercent: number | null;
|
|
63
|
+
maxCpuPercent: number | null;
|
|
64
|
+
avgMemoryPercent: number | null;
|
|
65
|
+
minMemoryPercent: number | null;
|
|
66
|
+
maxMemoryPercent: number | null;
|
|
67
|
+
avgMemoryBytes: number | null;
|
|
68
|
+
minMemoryBytes: number | null;
|
|
69
|
+
maxMemoryBytes: number | null;
|
|
70
|
+
}
|
|
71
|
+
export interface ApplicationMetrics extends CoreLifetimeMetrics, ComputedMetrics, MetricsBreakdowns {
|
|
72
|
+
requestsByPeriod: Array<RequestsByPeriod>;
|
|
66
73
|
eventsByPeriod: Array<EventsByPeriod>;
|
|
67
|
-
totalWebhooks: number;
|
|
68
|
-
successfulWebhooks: number;
|
|
69
|
-
failedWebhooks: number;
|
|
70
|
-
totalSentinelChecks: number;
|
|
71
|
-
successfulSentinelChecks: number;
|
|
72
|
-
failedSentinelChecks: number;
|
|
73
74
|
logsByPeriod: Array<LogsByPeriod>;
|
|
74
|
-
|
|
75
|
+
stats: ApplicationStatsMetrics;
|
|
76
|
+
lifetime: CoreLifetimeMetrics;
|
|
75
77
|
}
|
|
76
78
|
export interface GetReportAdminResponse {
|
|
77
79
|
data: {
|
|
@@ -10,5 +10,7 @@ export * from './models/application-webhook-history.model';
|
|
|
10
10
|
export * from './models/application-sentinel.model';
|
|
11
11
|
export * from './models/application-sentinel-history.model';
|
|
12
12
|
export * from './models/partition-optimization-history.model';
|
|
13
|
+
export * from './models/application-lifetime-metrics.model';
|
|
14
|
+
export * from './models/application-hourly-metrics.model';
|
|
13
15
|
export * from './api';
|
|
14
16
|
export * from './dto';
|
|
@@ -26,5 +26,7 @@ __exportStar(require("./models/application-webhook-history.model"), exports);
|
|
|
26
26
|
__exportStar(require("./models/application-sentinel.model"), exports);
|
|
27
27
|
__exportStar(require("./models/application-sentinel-history.model"), exports);
|
|
28
28
|
__exportStar(require("./models/partition-optimization-history.model"), exports);
|
|
29
|
+
__exportStar(require("./models/application-lifetime-metrics.model"), exports);
|
|
30
|
+
__exportStar(require("./models/application-hourly-metrics.model"), exports);
|
|
29
31
|
__exportStar(require("./api"), exports);
|
|
30
32
|
__exportStar(require("./dto"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CoreLifetimeMetrics, ApplicationStatsMetrics, MetricsBreakdowns } from '../api/responses/report.admin.response';
|
|
2
|
+
export interface HourlyComputedMetrics {
|
|
3
|
+
avgResponseTime: number;
|
|
4
|
+
mostUsedEndpoint: string;
|
|
5
|
+
errorRate: number;
|
|
6
|
+
availabilityRate: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IApplicationHourlyMetrics extends CoreLifetimeMetrics, HourlyComputedMetrics, MetricsBreakdowns, ApplicationStatsMetrics {
|
|
9
|
+
id?: string;
|
|
10
|
+
applicationId: string;
|
|
11
|
+
hour: Date;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
}
|