@@ -267,32 +267,29 @@ export class ChainportService {
267
267
token . web3_address ,
268
268
) ;
269
269
if ( ! asset ) {
270
- this . datadogService . event (
271
- 'Mismatched asset' ,
272
- `Could not find asset ${ token . web3_address } ` ,
273
- { alert_type : 'error' } ,
274
- ) ;
270
+ this . datadogService . increment ( 'chainport.errors' , 1 , {
271
+ type : 'missing_asset' ,
272
+ asset : token . web3_address ,
273
+ } ) ;
275
274
continue ;
276
275
}
277
276
278
277
if ( ! asset . verified_metadata ) {
279
- this . datadogService . event (
280
- 'Unverified asset' ,
281
- `Asset ${ asset . identifier } is unverified` ,
282
- { alert_type : 'warning' } ,
283
- ) ;
278
+ this . datadogService . increment ( 'chainport.errors' , 1 , {
279
+ type : 'unverified_asset' ,
280
+ asset : asset . identifier ,
281
+ } ) ;
284
282
continue ;
285
283
}
286
284
287
285
if ( asset . verified_metadata . decimals !== token . decimals ) {
288
- const message = `${ asset . identifier }
289
- Iron Fish: ${ asset . verified_metadata . decimals ?? 'null' }
290
- Chainport: ${ token . decimals } ` ;
291
- this . datadogService . event (
292
- 'Mismatched verified asset decimals' ,
293
- message ,
294
- { alert_type : 'warning' } ,
295
- ) ;
286
+ this . datadogService . increment ( 'chainport.errors' , 1 , {
287
+ type : 'mismatched_decimals' ,
288
+ iron_fish_decimals : (
289
+ asset . verified_metadata . decimals ?? 0
290
+ ) . toString ( ) ,
291
+ chainport_decimals : token . decimals . toString ( ) ,
292
+ } ) ;
296
293
continue ;
297
294
}
298
295
0 commit comments