@abyss-project/monitor 9.0.1 → 9.1.0

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.
Files changed (95) hide show
  1. package/dist/api/error-group.api.d.ts +7 -0
  2. package/dist/api/error-group.api.js +29 -0
  3. package/dist/api/error-group.api.js.map +1 -0
  4. package/dist/api/index.d.ts +1 -0
  5. package/dist/api/index.js +1 -0
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/index.d.ts +9 -0
  8. package/dist/index.js +9 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/rules/condition.bounds.d.ts +9 -3
  11. package/dist/rules/condition.bounds.js +41 -9
  12. package/dist/rules/condition.bounds.js.map +1 -1
  13. package/dist/rules/condition.compiler.d.ts +4 -4
  14. package/dist/rules/condition.compiler.js +13 -14
  15. package/dist/rules/condition.compiler.js.map +1 -1
  16. package/dist/rules/condition.parser.d.ts +2 -1
  17. package/dist/rules/condition.parser.js +26 -6
  18. package/dist/rules/condition.parser.js.map +1 -1
  19. package/dist/rules/condition.printer.d.ts +2 -1
  20. package/dist/rules/condition.printer.js +5 -2
  21. package/dist/rules/condition.printer.js.map +1 -1
  22. package/dist/rules/condition.types.d.ts +11 -1
  23. package/dist/rules/condition.types.js +1 -0
  24. package/dist/rules/condition.types.js.map +1 -1
  25. package/dist/types/enum/alert-rule-evaluation.enum.d.ts +2 -1
  26. package/dist/types/enum/alert-rule-evaluation.enum.js +1 -0
  27. package/dist/types/enum/alert-rule-evaluation.enum.js.map +1 -1
  28. package/dist/types/enum/alert-rule-field.enum.d.ts +7 -2
  29. package/dist/types/enum/alert-rule-field.enum.js +7 -1
  30. package/dist/types/enum/alert-rule-field.enum.js.map +1 -1
  31. package/dist/types/enum/alert-rule-group-by.enum.d.ts +2 -1
  32. package/dist/types/enum/alert-rule-group-by.enum.js +1 -0
  33. package/dist/types/enum/alert-rule-group-by.enum.js.map +1 -1
  34. package/dist/types/enum/api-error.enum.d.ts +1 -0
  35. package/dist/types/enum/api-error.enum.js +1 -0
  36. package/dist/types/enum/api-error.enum.js.map +1 -1
  37. package/dist/types/enum/error-group-count-granularity.enum.d.ts +4 -0
  38. package/dist/types/enum/error-group-count-granularity.enum.js +9 -0
  39. package/dist/types/enum/error-group-count-granularity.enum.js.map +1 -0
  40. package/dist/types/enum/error-group-event.enum.d.ts +4 -0
  41. package/dist/types/enum/error-group-event.enum.js +9 -0
  42. package/dist/types/enum/error-group-event.enum.js.map +1 -0
  43. package/dist/types/enum/error-group-order-by.enum.d.ts +6 -0
  44. package/dist/types/enum/error-group-order-by.enum.js +11 -0
  45. package/dist/types/enum/error-group-order-by.enum.js.map +1 -0
  46. package/dist/types/enum/error-group-status.enum.d.ts +7 -0
  47. package/dist/types/enum/error-group-status.enum.js +12 -0
  48. package/dist/types/enum/error-group-status.enum.js.map +1 -0
  49. package/dist/types/enum/error-type.enum.d.ts +12 -0
  50. package/dist/types/enum/error-type.enum.js +17 -0
  51. package/dist/types/enum/error-type.enum.js.map +1 -0
  52. package/dist/types/enum/index.d.ts +5 -0
  53. package/dist/types/enum/index.js +5 -0
  54. package/dist/types/enum/index.js.map +1 -1
  55. package/dist/types/enum/monitor-warning-code.enum.d.ts +2 -1
  56. package/dist/types/enum/monitor-warning-code.enum.js +1 -0
  57. package/dist/types/enum/monitor-warning-code.enum.js.map +1 -1
  58. package/dist/types/interface/api/index.d.ts +2 -0
  59. package/dist/types/interface/api/index.js +2 -0
  60. package/dist/types/interface/api/index.js.map +1 -1
  61. package/dist/types/interface/api/requests/alert-rule.request.d.ts +4 -3
  62. package/dist/types/interface/api/requests/application-log.request.d.ts +1 -0
  63. package/dist/types/interface/api/requests/error-group.request.d.ts +37 -0
  64. package/dist/types/interface/api/requests/error-group.request.js +3 -0
  65. package/dist/types/interface/api/requests/error-group.request.js.map +1 -0
  66. package/dist/types/interface/api/responses/error-group.response.d.ts +37 -0
  67. package/dist/types/interface/api/responses/error-group.response.js +3 -0
  68. package/dist/types/interface/api/responses/error-group.response.js.map +1 -0
  69. package/dist/types/interface/index.d.ts +1 -0
  70. package/dist/types/interface/index.js +1 -0
  71. package/dist/types/interface/index.js.map +1 -1
  72. package/dist/types/interface/models/application-log.model.d.ts +1 -0
  73. package/dist/types/interface/models/monitor-alert-rule.model.d.ts +2 -1
  74. package/dist/types/interface/models/monitor-error-group.model.d.ts +37 -0
  75. package/dist/types/interface/models/monitor-error-group.model.js +3 -0
  76. package/dist/types/interface/models/monitor-error-group.model.js.map +1 -0
  77. package/dist/utils/error-fingerprint/classify-error.d.ts +13 -0
  78. package/dist/utils/error-fingerprint/classify-error.js +110 -0
  79. package/dist/utils/error-fingerprint/classify-error.js.map +1 -0
  80. package/dist/utils/error-fingerprint/compute-error-fingerprint.d.ts +10 -0
  81. package/dist/utils/error-fingerprint/compute-error-fingerprint.js +24 -0
  82. package/dist/utils/error-fingerprint/compute-error-fingerprint.js.map +1 -0
  83. package/dist/utils/error-fingerprint/index.d.ts +4 -0
  84. package/dist/utils/error-fingerprint/index.js +21 -0
  85. package/dist/utils/error-fingerprint/index.js.map +1 -0
  86. package/dist/utils/error-fingerprint/normalize-message.d.ts +2 -0
  87. package/dist/utils/error-fingerprint/normalize-message.js +47 -0
  88. package/dist/utils/error-fingerprint/normalize-message.js.map +1 -0
  89. package/dist/utils/error-fingerprint/normalize-stack.d.ts +2 -0
  90. package/dist/utils/error-fingerprint/normalize-stack.js +52 -0
  91. package/dist/utils/error-fingerprint/normalize-stack.js.map +1 -0
  92. package/dist/utils/index.d.ts +1 -0
  93. package/dist/utils/index.js +1 -0
  94. package/dist/utils/index.js.map +1 -1
  95. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+ import { BasePaginate, IResponse } from '..';
2
+ import { ErrorGroupCountGranularity, ErrorGroupStatus, MonitorErrorType } from '../../../enum';
3
+ import { IApplicationLog } from '../../models/application-log.model';
4
+ import { IMonitorErrorGroup, IMonitorErrorGroupRelease } from '../../models/monitor-error-group.model';
5
+ export type IPaginateErrorGroupResponse = IResponse<BasePaginate<IMonitorErrorGroup>>;
6
+ export interface IGetErrorGroupData {
7
+ group: IMonitorErrorGroup;
8
+ releases: IMonitorErrorGroupRelease[];
9
+ }
10
+ export type IGetErrorGroupResponse = IResponse<IGetErrorGroupData>;
11
+ export interface IErrorGroupCountPoint {
12
+ bucket: Date;
13
+ count: number;
14
+ }
15
+ export interface IGetCountsErrorGroupData {
16
+ granularity: ErrorGroupCountGranularity;
17
+ points: IErrorGroupCountPoint[];
18
+ }
19
+ export type IGetCountsErrorGroupResponse = IResponse<IGetCountsErrorGroupData>;
20
+ export type IPaginateOccurrencesErrorGroupResponse = IResponse<BasePaginate<IApplicationLog>>;
21
+ export interface IUpdateStatusErrorGroupData {
22
+ group: IMonitorErrorGroup;
23
+ }
24
+ export type IUpdateStatusErrorGroupResponse = IResponse<IUpdateStatusErrorGroupData>;
25
+ export interface IErrorGroupTypeCount {
26
+ errorType: MonitorErrorType;
27
+ count: number;
28
+ }
29
+ export interface IErrorGroupStatusCount {
30
+ status: ErrorGroupStatus;
31
+ count: number;
32
+ }
33
+ export interface IGetSummaryErrorGroupData {
34
+ byType: IErrorGroupTypeCount[];
35
+ byStatus: IErrorGroupStatusCount[];
36
+ }
37
+ export type IGetSummaryErrorGroupResponse = IResponse<IGetSummaryErrorGroupData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=error-group.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-group.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/error-group.response.ts"],"names":[],"mappings":""}
@@ -22,6 +22,7 @@ export * from './models/monitor-alert-rule.model';
22
22
  export * from './models/monitor-notification-channel.model';
23
23
  export * from './models/monitor-notification-delivery.model';
24
24
  export * from './models/monitor-warning.model';
25
+ export * from './models/monitor-error-group.model';
25
26
  export * from './models/alert-message.model';
26
27
  export * from './api';
27
28
  export * from './dto';
@@ -38,6 +38,7 @@ __exportStar(require("./models/monitor-alert-rule.model"), exports);
38
38
  __exportStar(require("./models/monitor-notification-channel.model"), exports);
39
39
  __exportStar(require("./models/monitor-notification-delivery.model"), exports);
40
40
  __exportStar(require("./models/monitor-warning.model"), exports);
41
+ __exportStar(require("./models/monitor-error-group.model"), exports);
41
42
  __exportStar(require("./models/alert-message.model"), exports);
42
43
  __exportStar(require("./api"), exports);
43
44
  __exportStar(require("./dto"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,yEAAuD;AACvD,sDAAoC;AACpC,mEAAiD;AACjD,iEAA+C;AAC/C,0EAAwD;AACxD,uEAAqD;AACrD,+EAA6D;AAC7D,mEAAiD;AACjD,qEAAmD;AACnD,6EAA2D;AAC3D,sEAAoD;AACpD,6EAA2D;AAC3D,8EAA4D;AAC5D,gFAA8D;AAC9D,8EAA4D;AAC5D,4EAA0D;AAC1D,mEAAiD;AACjD,iEAA+C;AAC/C,kEAAgD;AAChD,oEAAkD;AAClD,8EAA4D;AAC5D,+EAA6D;AAC7D,iEAA+C;AAC/C,+DAA6C;AAG7C,wCAAsB;AACtB,wCAAsB;AACtB,+CAA6B;AAC7B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,yEAAuD;AACvD,sDAAoC;AACpC,mEAAiD;AACjD,iEAA+C;AAC/C,0EAAwD;AACxD,uEAAqD;AACrD,+EAA6D;AAC7D,mEAAiD;AACjD,qEAAmD;AACnD,6EAA2D;AAC3D,sEAAoD;AACpD,6EAA2D;AAC3D,8EAA4D;AAC5D,gFAA8D;AAC9D,8EAA4D;AAC5D,4EAA0D;AAC1D,mEAAiD;AACjD,iEAA+C;AAC/C,kEAAgD;AAChD,oEAAkD;AAClD,8EAA4D;AAC5D,+EAA6D;AAC7D,iEAA+C;AAC/C,qEAAmD;AACnD,+DAA6C;AAG7C,wCAAsB;AACtB,wCAAsB;AACtB,+CAA6B;AAC7B,mDAAiC"}
@@ -19,6 +19,7 @@ export interface IApplicationLog {
19
19
  environment?: string;
20
20
  release?: string | null;
21
21
  actorKey?: string | null;
22
+ fingerprint?: string | null;
22
23
  expiresAt?: Date | null;
23
24
  updatedAt?: Date;
24
25
  createdAt?: Date;
@@ -1,5 +1,5 @@
1
1
  import type { IAlertRuleCondition } from '../../../rules/condition.types';
2
- import { AlertRuleEvaluation, AlertRuleGroupBy, AlertRuleMode, IncidentSeverity, LogLevel } from '../../enum';
2
+ import { AlertRuleEvaluation, AlertRuleGroupBy, AlertRuleMode, ErrorGroupEvent, IncidentSeverity, LogLevel } from '../../enum';
3
3
  export interface IMonitorAlertRuleFilter {
4
4
  levels: LogLevel[];
5
5
  contexts: string[];
@@ -17,6 +17,7 @@ export interface IMonitorAlertRule {
17
17
  applicationIds: string[];
18
18
  evaluation: AlertRuleEvaluation;
19
19
  mode: AlertRuleMode;
20
+ groupEvents: ErrorGroupEvent[];
20
21
  filter: IMonitorAlertRuleFilter;
21
22
  condition: IAlertRuleCondition | null;
22
23
  windowMinutes: number;
@@ -0,0 +1,37 @@
1
+ import { ErrorGroupStatus, LogLevel, MonitorErrorType } from '../../enum';
2
+ export interface IMonitorErrorGroup {
3
+ id: string;
4
+ projectId: string;
5
+ applicationId: string;
6
+ environment: string;
7
+ fingerprint: string;
8
+ level: LogLevel;
9
+ context: string | null;
10
+ scenario: string | null;
11
+ normalizedMessage: string;
12
+ sampleMessage: string;
13
+ topFrame: string | null;
14
+ errorType: MonitorErrorType;
15
+ status: ErrorGroupStatus;
16
+ firstSeenAt: Date;
17
+ lastSeenAt: Date;
18
+ occurrenceCount: number;
19
+ affectedActorCount: number;
20
+ firstRelease: string | null;
21
+ lastRelease: string | null;
22
+ resolvedAt: Date | null;
23
+ resolvedInRelease: string | null;
24
+ regressedAt: Date | null;
25
+ assigneeUserId: string | null;
26
+ acknowledgedAt: Date | null;
27
+ isOverflow: boolean;
28
+ createdAt?: Date;
29
+ updatedAt?: Date;
30
+ }
31
+ export interface IMonitorErrorGroupRelease {
32
+ groupId: string;
33
+ release: string;
34
+ firstSeenAt: Date;
35
+ lastSeenAt: Date;
36
+ count: number;
37
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=monitor-error-group.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitor-error-group.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/monitor-error-group.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { MonitorErrorType } from '../../types/enum/error-type.enum';
2
+ export interface IClassifyErrorInput {
3
+ errorName?: string | null;
4
+ message: string;
5
+ httpStatus?: number | null;
6
+ }
7
+ export interface IClassifyErrorResult {
8
+ type: MonitorErrorType;
9
+ matchedRule: string | null;
10
+ }
11
+ export declare const CLASSIFY_ERROR_RULE_IDS: readonly string[];
12
+ export declare const classifyError: (input: IClassifyErrorInput) => IClassifyErrorResult;
13
+ export declare const extractErrorName: (message: string, stack?: string | null) => string | null;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractErrorName = exports.classifyError = exports.CLASSIFY_ERROR_RULE_IDS = void 0;
4
+ const error_type_enum_1 = require("../../types/enum/error-type.enum");
5
+ const statusIn = (...statuses) => (input) => input.httpStatus !== null &&
6
+ input.httpStatus !== undefined &&
7
+ statuses.includes(input.httpStatus);
8
+ const nameMatches = (pattern) => (input) => input.errorName !== null && input.errorName !== undefined && pattern.test(input.errorName);
9
+ const messageMatches = (pattern) => (input) => pattern.test(input.message);
10
+ const RULES = [
11
+ { id: 'status:429', type: error_type_enum_1.MonitorErrorType.RATE_LIMITED, test: statusIn(429) },
12
+ { id: 'status:401|403', type: error_type_enum_1.MonitorErrorType.PERMISSION_DENIED, test: statusIn(401, 403) },
13
+ { id: 'status:404', type: error_type_enum_1.MonitorErrorType.NOT_FOUND, test: statusIn(404) },
14
+ { id: 'status:408|504', type: error_type_enum_1.MonitorErrorType.TIMEOUT_DOWNSTREAM, test: statusIn(408, 504) },
15
+ { id: 'status:400|422', type: error_type_enum_1.MonitorErrorType.VALIDATION_FAILED, test: statusIn(400, 422) },
16
+ { id: 'name:timeout', type: error_type_enum_1.MonitorErrorType.TIMEOUT_DOWNSTREAM, test: nameMatches(/timeout/i) },
17
+ {
18
+ id: 'name:connection-refused',
19
+ type: error_type_enum_1.MonitorErrorType.CONNECTION_REFUSED,
20
+ test: nameMatches(/connectionrefused/i),
21
+ },
22
+ {
23
+ id: 'name:validation',
24
+ type: error_type_enum_1.MonitorErrorType.VALIDATION_FAILED,
25
+ test: nameMatches(/validation|validator|zoderror/i),
26
+ },
27
+ {
28
+ id: 'name:permission',
29
+ type: error_type_enum_1.MonitorErrorType.PERMISSION_DENIED,
30
+ test: nameMatches(/unauthori[sz]ed|forbidden|permission|accessdenied/i),
31
+ },
32
+ {
33
+ id: 'name:not-found',
34
+ type: error_type_enum_1.MonitorErrorType.NOT_FOUND,
35
+ test: nameMatches(/notfound|emptyresult/i),
36
+ },
37
+ {
38
+ id: 'name:rate-limit',
39
+ type: error_type_enum_1.MonitorErrorType.RATE_LIMITED,
40
+ test: nameMatches(/ratelimit|toomanyrequests|throttl/i),
41
+ },
42
+ { id: 'name:syntax', type: error_type_enum_1.MonitorErrorType.SERIALIZATION, test: nameMatches(/^SyntaxError$/) },
43
+ {
44
+ id: 'message:connection-refused',
45
+ type: error_type_enum_1.MonitorErrorType.CONNECTION_REFUSED,
46
+ test: messageMatches(/\bECONNREFUSED\b|connection refused/i),
47
+ },
48
+ {
49
+ id: 'message:timeout',
50
+ type: error_type_enum_1.MonitorErrorType.TIMEOUT_DOWNSTREAM,
51
+ test: messageMatches(/\btime[ -]?outs?\b|\btimed out\b|\bE(?:SOCKET)?TIMEDOUT\b/i),
52
+ },
53
+ {
54
+ id: 'message:resource-exhausted',
55
+ type: error_type_enum_1.MonitorErrorType.RESOURCE_EXHAUSTED,
56
+ test: messageMatches(/\bENOSPC\b|\bEMFILE\b|\bENOMEM\b|no space left|out of memory|too many open files|maximum call stack|pool (?:is )?exhausted/i),
57
+ },
58
+ {
59
+ id: 'message:rate-limit',
60
+ type: error_type_enum_1.MonitorErrorType.RATE_LIMITED,
61
+ test: messageMatches(/rate[ -]?limit|too many requests|quota exceeded/i),
62
+ },
63
+ {
64
+ id: 'message:configuration',
65
+ type: error_type_enum_1.MonitorErrorType.CONFIGURATION,
66
+ test: messageMatches(/\b(?:missing|undefined) (?:required )?(?:environment|env) variable\b|\bnot configured\b|\b(?:invalid|missing) config(?:uration)?\b/i),
67
+ },
68
+ {
69
+ id: 'message:permission',
70
+ type: error_type_enum_1.MonitorErrorType.PERMISSION_DENIED,
71
+ test: messageMatches(/\bEACCES\b|\bEPERM\b|permission denied|\bunauthori[sz]ed\b|\bforbidden\b|access denied|\bnot allowed\b/i),
72
+ },
73
+ {
74
+ id: 'message:serialization',
75
+ type: error_type_enum_1.MonitorErrorType.SERIALIZATION,
76
+ test: messageMatches(/unexpected token|JSON at position|unexpected end of JSON|is not valid JSON|converting circular structure|cannot (?:parse|serialize|deserialize)/i),
77
+ },
78
+ {
79
+ id: 'message:validation',
80
+ type: error_type_enum_1.MonitorErrorType.VALIDATION_FAILED,
81
+ test: messageMatches(/\bmust be\b|\bis required\b|\bvalidation (?:failed|error)\b|\bis (?:not valid|invalid)\b/i),
82
+ },
83
+ {
84
+ id: 'message:not-found',
85
+ type: error_type_enum_1.MonitorErrorType.NOT_FOUND,
86
+ test: messageMatches(/\bnot found\b|\bdoes not exist\b|\bno such\b|\bENOENT\b/i),
87
+ },
88
+ ];
89
+ exports.CLASSIFY_ERROR_RULE_IDS = RULES.map((rule) => rule.id);
90
+ const classifyError = (input) => {
91
+ const rule = RULES.find((candidate) => candidate.test(input));
92
+ return rule === undefined
93
+ ? { type: error_type_enum_1.MonitorErrorType.UNKNOWN, matchedRule: null }
94
+ : { type: rule.type, matchedRule: rule.id };
95
+ };
96
+ exports.classifyError = classifyError;
97
+ const ERROR_NAME_PREFIX = /^\s*((?:[A-Za-z_$][\w$]*)?(?:Error|Exception))(?=$|[\s:[(])/;
98
+ const extractErrorName = (message, stack) => {
99
+ const fromMessage = ERROR_NAME_PREFIX.exec(message);
100
+ if (fromMessage !== null) {
101
+ return fromMessage[1];
102
+ }
103
+ if (stack === null || stack === undefined) {
104
+ return null;
105
+ }
106
+ const fromStack = ERROR_NAME_PREFIX.exec(stack.split('\n', 1)[0]);
107
+ return fromStack === null ? null : fromStack[1];
108
+ };
109
+ exports.extractErrorName = extractErrorName;
110
+ //# sourceMappingURL=classify-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify-error.js","sourceRoot":"","sources":["../../../src/utils/error-fingerprint/classify-error.ts"],"names":[],"mappings":";;;AAAA,sEAAoE;AAsBpE,MAAM,QAAQ,GACZ,CAAC,GAAG,QAAkB,EAAE,EAAE,CAC1B,CAAC,KAA0B,EAAW,EAAE,CACtC,KAAK,CAAC,UAAU,KAAK,IAAI;IACzB,KAAK,CAAC,UAAU,KAAK,SAAS;IAC9B,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAExC,MAAM,WAAW,GACf,CAAC,OAAe,EAAE,EAAE,CACpB,CAAC,KAA0B,EAAW,EAAE,CACtC,KAAK,CAAC,SAAS,KAAK,IAAI,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE/F,MAAM,cAAc,GAClB,CAAC,OAAe,EAAE,EAAE,CACpB,CAAC,KAA0B,EAAW,EAAE,CACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAOhC,MAAM,K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,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B"}
@@ -0,0 +1,10 @@
1
+ import { LogLevel } from '../../types/enum/log-level.enum';
2
+ export declare const ERROR_FINGERPRINT_LENGTH = 40;
3
+ export interface IComputeErrorFingerprintInput {
4
+ level: LogLevel;
5
+ context?: string | null;
6
+ scenario?: string | null;
7
+ message: string;
8
+ stack?: string | null;
9
+ }
10
+ export declare const computeErrorFingerprint: (input: IComputeErrorFingerprintInput) => string;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.computeErrorFingerprint = exports.ERROR_FINGERPRINT_LENGTH = void 0;
4
+ const node_require_1 = require("../node-require");
5
+ const normalize_message_1 = require("./normalize-message");
6
+ const normalize_stack_1 = require("./normalize-stack");
7
+ exports.ERROR_FINGERPRINT_LENGTH = 40;
8
+ const PART_SEPARATOR = '\u001f';
9
+ const computeErrorFingerprint = (input) => {
10
+ const { createHash } = (0, node_require_1.nodeRequire)('crypto');
11
+ const parts = [
12
+ String(input.level),
13
+ input.context ?? '',
14
+ input.scenario ?? '',
15
+ (0, normalize_message_1.normalizeMessage)(input.message),
16
+ (0, normalize_stack_1.normalizeStack)(input.stack).join('\n'),
17
+ ];
18
+ return createHash('sha256')
19
+ .update(parts.join(PART_SEPARATOR))
20
+ .digest('hex')
21
+ .slice(0, exports.ERROR_FINGERPRINT_LENGTH);
22
+ };
23
+ exports.computeErrorFingerprint = computeErrorFingerprint;
24
+ //# sourceMappingURL=compute-error-fingerprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute-error-fingerprint.js","sourceRoot":"","sources":["../../../src/utils/error-fingerprint/compute-error-fingerprint.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAC9C,2DAAuD;AACvD,uDAAmD;AAGtC,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAG3C,MAAM,cAAc,GAAG,QAAQ,CAAC;AAgBzB,MAAM,uBAAuB,GAAG,CAAC,KAAoC,EAAU,EAAE;IAEtF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,0BAAW,EAA0B,QAAQ,CAAC,CAAC;IACtE,MAAM,KAAK,GAAG;QACZ,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QACnB,KAAK,CAAC,OAAO,IAAI,EAAE;QACnB,KAAK,CAAC,QAAQ,IAAI,EAAE;QACpB,IAAA,oCAAgB,EAAC,KAAK,CAAC,OAAO,CAAC;QAC/B,IAAA,gCAAc,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;KACvC,CAAC;IACF,OAAO,UAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;SAClC,MAAM,CAAC,KAAK,CAAC;SACb,KAAK,CAAC,CAAC,EAAE,gCAAwB,CAAC,CAAC;AACxC,CAAC,CAAC;AAdW,QAAA,uBAAuB,2BAclC"}
@@ -0,0 +1,4 @@
1
+ export * from './normalize-message';
2
+ export * from './normalize-stack';
3
+ export * from './compute-error-fingerprint';
4
+ export * from './classify-error';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./normalize-message"), exports);
18
+ __exportStar(require("./normalize-stack"), exports);
19
+ __exportStar(require("./compute-error-fingerprint"), exports);
20
+ __exportStar(require("./classify-error"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/error-fingerprint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,oDAAkC;AAClC,8DAA4C;AAC5C,mDAAiC"}
@@ -0,0 +1,2 @@
1
+ export declare const NORMALIZED_MESSAGE_MAX_LENGTH = 1024;
2
+ export declare const normalizeMessage: (message: string) => string;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeMessage = exports.NORMALIZED_MESSAGE_MAX_LENGTH = void 0;
4
+ exports.NORMALIZED_MESSAGE_MAX_LENGTH = 1024;
5
+ const QUOTED_STRING_MAX_LENGTH = 32;
6
+ const UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
7
+ const ISO_DATE_PATTERN = /(?<!\d)\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:[.,]\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?(?!\d)/g;
8
+ const EMAIL_PATTERN = /[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}/g;
9
+ const URL_PATTERN = /\b[A-Za-z][A-Za-z0-9+.-]*:\/\/(?:[^\s"'<>`]|<(?:uuid|date|email)>)+/g;
10
+ const HEX_PATTERN = /(?<![0-9A-Za-z])(?=[0-9a-f]*\d)(?=[0-9a-f]*[a-f])[0-9a-f]{8,}(?![0-9A-Za-z])/gi;
11
+ const NUMBER_PATTERN = /(?<![0-9A-Za-z.])[-+]?\d+(?:\.\d+)*(?![0-9A-Za-z])/g;
12
+ const QUOTED_STRING_PATTERN = new RegExp(['"', "'", '`']
13
+ .map((quote) => `${quote}[^${quote}\\n]{${QUOTED_STRING_MAX_LENGTH + 1},}${quote}`)
14
+ .join('|'), 'g');
15
+ const NUMERIC_SEGMENT = /^\d+$/;
16
+ const HEX_SEGMENT = /^[0-9a-f]{8,}$/i;
17
+ const normalizeUrl = (url) => {
18
+ const withoutQuery = url.split(/[?#]/, 1)[0];
19
+ const authorityEnd = withoutQuery.indexOf('/', withoutQuery.indexOf('://') + 3);
20
+ if (authorityEnd === -1) {
21
+ return withoutQuery;
22
+ }
23
+ const origin = withoutQuery.slice(0, authorityEnd);
24
+ const segments = withoutQuery
25
+ .slice(authorityEnd)
26
+ .split('/')
27
+ .map((segment) => {
28
+ if (NUMERIC_SEGMENT.test(segment)) {
29
+ return '<n>';
30
+ }
31
+ return HEX_SEGMENT.test(segment) ? '<hex>' : segment;
32
+ });
33
+ return `${origin}${segments.join('/')}`;
34
+ };
35
+ const normalizeMessage = (message) => message
36
+ .replace(UUID_PATTERN, '<uuid>')
37
+ .replace(ISO_DATE_PATTERN, '<date>')
38
+ .replace(EMAIL_PATTERN, '<email>')
39
+ .replace(URL_PATTERN, normalizeUrl)
40
+ .replace(HEX_PATTERN, '<hex>')
41
+ .replace(NUMBER_PATTERN, '<n>')
42
+ .replace(QUOTED_STRING_PATTERN, '<str>')
43
+ .replace(/\s+/g, ' ')
44
+ .trim()
45
+ .slice(0, exports.NORMALIZED_MESSAGE_MAX_LENGTH);
46
+ exports.normalizeMessage = normalizeMessage;
47
+ //# sourceMappingURL=normalize-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-message.js","sourceRoot":"","sources":["../../../src/utils/error-fingerprint/normalize-message.ts"],"names":[],"mappings":";;;AACa,QAAA,6BAA6B,GAAG,IAAI,CAAC;AAGlD,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAEpC,MAAM,Y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,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IACvD,CAAC,CAAC,CAAC;IACL,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1C,CAAC,CAAC;AAYK,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE,CAC1D,OAAO;KACJ,OAAO,CAAC,YAAY,EAAE,QAAQ,CAAC;KAC/B,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC;KACnC,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC;KACjC,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC;KAClC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC;KAC7B,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC;KAC9B,OAAO,CAAC,qBAAqB,EAAE,OAAO,CAAC;KACvC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;KACpB,IAAI,EAAE;KACN,KAAK,CAAC,CAAC,EAAE,qCAA6B,CAAC,CAAC;AAXhC,QAAA,gBAAgB,oBAWgB"}
@@ -0,0 +1,2 @@
1
+ export declare const NORMALIZED_STACK_MAX_FRAMES = 5;
2
+ export declare const normalizeStack: (stack: string | null | undefined) => string[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeStack = exports.NORMALIZED_STACK_MAX_FRAMES = void 0;
4
+ exports.NORMALIZED_STACK_MAX_FRAMES = 5;
5
+ const PATH_ROOTS = ['src/', 'dist/', 'node_modules/'];
6
+ const FRAME_LINE = /^\s*at\s+(.+?)\s*$/;
7
+ const NAMED_FRAME = /^(.*) \(([^()]*)\)$/;
8
+ const LINE_AND_COLUMN = /(?::\d+){1,2}$/;
9
+ const ANONYMOUS_FUNCTION = '<anonymous>';
10
+ const relativePath = (location) => {
11
+ const path = location
12
+ .replace(/^file:\/\//, '')
13
+ .replace(/\\/g, '/')
14
+ .replace(LINE_AND_COLUMN, '');
15
+ const anchored = `/${path}`;
16
+ const cut = Math.max(...PATH_ROOTS.map((root) => anchored.lastIndexOf(`/${root}`)));
17
+ if (cut !== -1) {
18
+ return anchored.slice(cut + 1);
19
+ }
20
+ return path.slice(path.lastIndexOf('/') + 1);
21
+ };
22
+ const normalizeFrame = (line) => {
23
+ const frame = FRAME_LINE.exec(line);
24
+ if (frame === null) {
25
+ return null;
26
+ }
27
+ const named = NAMED_FRAME.exec(frame[1]);
28
+ const location = named === null ? frame[1] : named[2];
29
+ if (location.startsWith('node:internal')) {
30
+ return null;
31
+ }
32
+ const fn = named === null ? ANONYMOUS_FUNCTION : named[1].replace(/^async /, '');
33
+ return `${relativePath(location)}:${fn}`;
34
+ };
35
+ const normalizeStack = (stack) => {
36
+ if (stack === null || stack === undefined) {
37
+ return [];
38
+ }
39
+ const frames = [];
40
+ for (const line of stack.split('\n')) {
41
+ const frame = normalizeFrame(line);
42
+ if (frame !== null) {
43
+ frames.push(frame);
44
+ if (frames.length === exports.NORMALIZED_STACK_MAX_FRAMES) {
45
+ break;
46
+ }
47
+ }
48
+ }
49
+ return frames;
50
+ };
51
+ exports.normalizeStack = normalizeStack;
52
+ //# sourceMappingURL=normalize-stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-stack.js","sourceRoot":"","sources":["../../../src/utils/error-fingerprint/normalize-stack.ts"],"names":[],"mappings":";;;AACa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAG7C,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;AAEtD,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAGzC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAU,EAAE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C,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACjF,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;AAC3C,CAAC,CAAC;AAQK,MAAM,cAAc,GAAG,CAAC,KAAgC,EAAY,EAAE;IAC3E,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACrC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,IAAI,MAAM,CAAC,MAAM,KAAK,mCAA2B,EAAE,CAAC;gBAClD,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAfW,QAAA,cAAc,kBAezB"}
@@ -9,3 +9,4 @@ export * from './header-pattern';
9
9
  export * from './body-redaction';
10
10
  export * from './node-require';
11
11
  export * from './release.utils';
12
+ export * from './error-fingerprint';
@@ -25,4 +25,5 @@ __exportStar(require("./header-pattern"), exports);
25
25
  __exportStar(require("./body-redaction"), exports);
26
26
  __exportStar(require("./node-require"), exports);
27
27
  __exportStar(require("./release.utils"), exports);
28
+ __exportStar(require("./error-fingerprint"), exports);
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8DAA4C;AAC5C,+CAA6B;AAC7B,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,8DAA4C;AAC5C,+CAA6B;AAC7B,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/monitor",
3
- "version": "9.0.1",
3
+ "version": "9.1.0",
4
4
  "description": "Core package to interact with Abyss-Monitor",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",