diff --git a/packages/rum-core/src/performance-monitoring/transaction-service.js b/packages/rum-core/src/performance-monitoring/transaction-service.js index dfedaef77..4a6d4a19d 100644 --- a/packages/rum-core/src/performance-monitoring/transaction-service.js +++ b/packages/rum-core/src/performance-monitoring/transaction-service.js @@ -228,7 +228,7 @@ class TransactionService { if (__DEV__) { this._logger.debug(`startTransaction(${tr.id}, ${tr.name}, ${tr.type})`) } - this._config.dispatchEvent(TRANSACTION_START, [tr]) + this._config.events.send(TRANSACTION_START, [tr]) } return tr @@ -340,7 +340,7 @@ class TransactionService { const configContext = this._config.get('context') addTransactionContext(tr, configContext) - this._config.dispatchEvent(TRANSACTION_END, [tr]) + this._config.events.send(TRANSACTION_END, [tr]) if (__DEV__) { this._logger.debug( `end transaction(${tr.id}, ${tr.name}, ${tr.type})`, diff --git a/packages/rum-core/test/performance-monitoring/performance-monitoring.spec.js b/packages/rum-core/test/performance-monitoring/performance-monitoring.spec.js index ae86e9477..5f735ddb8 100644 --- a/packages/rum-core/test/performance-monitoring/performance-monitoring.spec.js +++ b/packages/rum-core/test/performance-monitoring/performance-monitoring.spec.js @@ -154,7 +154,7 @@ describe('PerformanceMonitoring', function () { it('should initialize and notify the transaction has been added to the queue', async () => { performanceMonitoring.init() - spyOn(configService, 'dispatchEvent') + spyOn(configService, 'dispatchEvent').and.callThrough() const tr = performanceMonitoring._transactionService.startTransaction( 'transaction', diff --git a/packages/rum-core/test/performance-monitoring/transaction-service.spec.js b/packages/rum-core/test/performance-monitoring/transaction-service.spec.js index 78008c56a..bf8ffaec1 100644 --- a/packages/rum-core/test/performance-monitoring/transaction-service.spec.js +++ b/packages/rum-core/test/performance-monitoring/transaction-service.spec.js @@ -65,7 +65,7 @@ describe('TransactionService', function () { spyOn(logger, 'debug') config = new Config() - spyOn(config, 'dispatchEvent') + spyOn(config, 'dispatchEvent').and.callThrough() transactionService = new TransactionService(logger, config) })