Skip to content

Commit

Permalink
no collection metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
zemberdotnet committed May 14, 2024
1 parent fa9129b commit 587a41a
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ export async function executeWithContext<
}
}

if (process.env.NO_COLLECTION_METRICS) {
logger.info('Disabling collection metrics');
}

const integrationStepResults = await executeSteps({
executionContext: context,
integrationSteps: config.integrationSteps,
Expand All @@ -296,8 +300,12 @@ export async function executeWithContext<
createStepGraphObjectDataUploader,
beforeAddEntity: config.beforeAddEntity,
beforeAddRelationship: config.beforeAddRelationship,
afterAddEntity: createAfterAddEntityInternalHook(logger),
afterAddRelationship: createAfterAddRelationshipInternalHook(logger),
afterAddEntity: process.env.NO_COLLECTION_METRICS
? undefined
: createAfterAddEntityInternalHook(logger),
afterAddRelationship: process.env.NO_COLLECTION_METRICS
? undefined
: createAfterAddRelationshipInternalHook(logger),
dependencyGraphOrder: config.dependencyGraphOrder,
executionHandlerWrapper: config.executionHandlerWrapper,
});
Expand Down

0 comments on commit 587a41a

Please sign in to comment.