@@ -905,7 +905,7 @@ API.prototype.startSegment = function startSegment(name, record, handler, callba
905
905
// Create the segment and call the handler.
906
906
const wrappedHandler = this . shim . record ( handler , function handlerNamer ( shim ) {
907
907
return {
908
- name : name ,
908
+ name,
909
909
recorder : record ? customRecorder : null ,
910
910
callback : callback ? shim . FIRST : null ,
911
911
promise : ! callback
@@ -1301,6 +1301,7 @@ API.prototype.recordCustomEvent = function recordCustomEvent(eventType, attribut
1301
1301
}
1302
1302
1303
1303
const tx = this . agent . getTransaction ( )
1304
+ // eslint-disable-next-line sonarjs/pseudo-random
1304
1305
const priority = ( tx && tx . priority ) || Math . random ( )
1305
1306
this . agent . customEventAggregator . add ( [ intrinsics , filteredAttributes ] , priority )
1306
1307
}
@@ -1326,9 +1327,9 @@ API.prototype.instrument = function instrument(moduleName, onRequire, onError) {
1326
1327
let opts = moduleName
1327
1328
if ( typeof opts === 'string' ) {
1328
1329
opts = {
1329
- moduleName : moduleName ,
1330
- onRequire : onRequire ,
1331
- onError : onError
1330
+ moduleName,
1331
+ onRequire,
1332
+ onError
1332
1333
}
1333
1334
}
1334
1335
@@ -1391,9 +1392,9 @@ API.prototype.instrumentDatastore = function instrumentDatastore(moduleName, onR
1391
1392
let opts = moduleName
1392
1393
if ( typeof opts === 'string' ) {
1393
1394
opts = {
1394
- moduleName : moduleName ,
1395
- onRequire : onRequire ,
1396
- onError : onError
1395
+ moduleName,
1396
+ onRequire,
1397
+ onError
1397
1398
}
1398
1399
}
1399
1400
@@ -1428,9 +1429,9 @@ API.prototype.instrumentWebframework = function instrumentWebframework(
1428
1429
let opts = moduleName
1429
1430
if ( typeof opts === 'string' ) {
1430
1431
opts = {
1431
- moduleName : moduleName ,
1432
- onRequire : onRequire ,
1433
- onError : onError
1432
+ moduleName,
1433
+ onRequire,
1434
+ onError
1434
1435
}
1435
1436
}
1436
1437
@@ -1461,9 +1462,9 @@ API.prototype.instrumentMessages = function instrumentMessages(moduleName, onReq
1461
1462
let opts = moduleName
1462
1463
if ( typeof opts === 'string' ) {
1463
1464
opts = {
1464
- moduleName : moduleName ,
1465
- onRequire : onRequire ,
1466
- onError : onError
1465
+ moduleName,
1466
+ onRequire,
1467
+ onError
1467
1468
}
1468
1469
}
1469
1470
0 commit comments