File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ export class Synchronizer {
196196 private createErrorGroup ( error : Error , sourceName : string ) : ErrorGroup {
197197 // truncate the error to the first 500 characters
198198 const maxNameLength = 500 ;
199- error . name = `[ ${ sourceName } ] ${ error . name } ` . substr ( 0 , maxNameLength ) ;
199+ error . name = error . name . substr ( 0 , maxNameLength ) ;
200200
201201 // wipe out line numbers
202202 let normalizedName = error . name ;
@@ -205,15 +205,16 @@ export class Synchronizer {
205205 // remove TypeError prefix from client errors that some browsers may emit
206206 normalizedName = normalizedName . replace ( / ( T y p e E r r o r : \s * ) / i, '' ) ;
207207
208- // generate clientId from the normalized name
209- const hash = crypto . createHash ( 'md5' ) . update ( normalizedName ) . digest ( 'hex' ) ;
208+ // generate clientId from the error source name and normalized error name
209+ const clientIdInput = `${ sourceName } :${ normalizedName } ` ;
210+ const clientId = crypto . createHash ( 'md5' ) . update ( clientIdInput ) . digest ( 'hex' ) ;
210211
211212 return {
212213 name : normalizedName ,
213214 sourceName,
214215 type : error . type ,
215216 priority : ErrorPriority . P5 ,
216- clientId : hash ,
217+ clientId,
217218 count : error . count ,
218219 countType : error . countType ,
219220 ticket : null ,
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ export enum ErrorPriority {
1010}
1111
1212export enum ErrorCountType {
13- USERS = 'Users ' ,
14- TRX = 'Transactions ' ,
13+ USERS = 'users ' ,
14+ TRX = 'transactions ' ,
1515}
1616
1717export enum ErrorType {
18- CLIENT = 'Client ' ,
19- SERVER = 'Server ' ,
18+ CLIENT = 'client ' ,
19+ SERVER = 'server ' ,
2020}
2121
2222export type Error = {
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ export class JiraTicketProvider implements TicketProviderInterface {
162162
163163 public async generateTicketContent ( errorGroup : ErrorGroup ) : Promise < TicketContent > {
164164 const maxInstances = 10 ;
165- const summary = `[${ errorGroup . type } ] ${ errorGroup . name } ` ;
165+ const summary = `[${ errorGroup . type } ] [ ${ errorGroup . sourceName } ] ${ errorGroup . name } ` ;
166166
167167 let description = errorGroup . name +
168168 '\nh3.Frequency\n' +
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class OpsGenieAlertProvider implements AlertProviderInterface {
9696 }
9797
9898 public async generateAlertContent ( errorGroup : ErrorGroup ) : Promise < AlertContent > {
99- const summary = `[BUG ] ${ errorGroup . name } ` . substr ( 0 , 130 ) ;
99+ const summary = `[${ errorGroup . type } ] [ ${ errorGroup . sourceName } ] ${ errorGroup . name } ` . substr ( 0 , 130 ) ;
100100
101101 return {
102102 clientId : errorGroup . clientId ,
You can’t perform that action at this time.
0 commit comments