Skip to content

Commit

Permalink
Merge pull request #598 from namecheap/fix/nr-call-in-worker
Browse files Browse the repository at this point in the history
fix: correct newrelic call for background process instrumentation.
  • Loading branch information
b1ff authored Aug 15, 2024
2 parents d322a8b + 19bd127 commit 5d3bf46
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 5d3bf46

Please sign in to comment.