diff --git a/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java b/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java index 1919e6df99..a8841eb1aa 100644 --- a/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java +++ b/repository/src/main/java/org/apache/atlas/discovery/EntityLineageService.java @@ -1328,11 +1328,21 @@ private boolean vertexMatchesEvaluation(AtlasVertex currentVertex, AtlasLineageC } private boolean vertexMatchesEvaluation(AtlasVertex currentVertex, AtlasLineageOnDemandContext atlasLineageOnDemandContext) { - return atlasLineageOnDemandContext.evaluate(currentVertex); + AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("vertexMatchesEvaluation"); + try { + return atlasLineageOnDemandContext.evaluate(currentVertex); + } finally { + RequestContext.get().endMetricRecord(metric); + } } private boolean edgeMatchesEvaluation(AtlasEdge currentEdge, AtlasLineageOnDemandContext atlasLineageOnDemandContext) { - return atlasLineageOnDemandContext.evaluate(currentEdge); + AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("edgeMatchesEvaluation"); + try { + return atlasLineageOnDemandContext.evaluate(currentEdge); + } finally { + RequestContext.get().endMetricRecord(metric); + } } private boolean shouldProcessEdge(AtlasLineageContext lineageContext, AtlasEdge edge) {