Skip to content

Commit

Permalink
fix: correct newrelic call for background process instrumentation.
Browse files Browse the repository at this point in the history
It is impossible to see locally because locally newrelic agent is disabled, putting completely other implementation of the function.
  • Loading branch information
b1ff committed Aug 15, 2024
1 parent d322a8b commit 19bd127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions registry/server/common/services/assets/AssetsDiscovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 19bd127

Please sign in to comment.