From 19bd1270bc1f8f2cd4737a0f777594296ef4c102 Mon Sep 17 00:00:00 2001 From: Evgeniy Moroz Date: Thu, 15 Aug 2024 15:43:58 +0100 Subject: [PATCH] fix: correct newrelic call for background process instrumentation. It is impossible to see locally because locally newrelic agent is disabled, putting completely other implementation of the function. --- registry/server/common/services/assets/AssetsDiscovery.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/registry/server/common/services/assets/AssetsDiscovery.ts b/registry/server/common/services/assets/AssetsDiscovery.ts index 6b832c3e..3ce5b461 100644 --- a/registry/server/common/services/assets/AssetsDiscovery.ts +++ b/registry/server/common/services/assets/AssetsDiscovery.ts @@ -8,7 +8,7 @@ import AssetsDiscoveryWhiteLists from './AssetsDiscoveryWhiteLists'; import { getLogger } from '../../../util/logger'; import { parseJSON } from '../json'; import { axiosErrorTransformer } from '../../../util/axiosErrorTransformer'; -import { startBackgroundTransaction } from 'newrelic'; +import newrelic from 'newrelic'; type AssetsDiscoveryEntity = { [key: string]: any; @@ -58,7 +58,7 @@ export default class AssetsDiscovery { } private async iteration() { - return startBackgroundTransaction(this.tableName, AssetsDiscovery.constructor.name, async () => { + return newrelic.startBackgroundTransaction(this.tableName, AssetsDiscovery.constructor.name, async () => { const now = Math.floor(Date.now() / 1000); const entities = await this.getEntitiesToRefresh(now);