Skip to content

Commit

Permalink
Merge pull request #638 from data-integrations/metric-bug-fix
Browse files Browse the repository at this point in the history
Fix bug in emitting metrics for only system directives
  • Loading branch information
vanathi-g authored Apr 27, 2023
2 parents 372eed2 + a59a739 commit ddf3059
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ private Optional<ExpressionFactory<String>> getExpressionFactory(RelationalTranf
*/
private void emitDirectiveMetrics(List<Directive> directives, Metrics metrics) throws DirectiveLoadException {
for (Directive directive : directives) {
// skip emitting metrics if the directive is not system metric
if (registry.get(Contexts.SYSTEM, directive.define().getDirectiveName()) != null) {
// skip emitting metrics if the directive is not system directive
if (registry.get(Contexts.SYSTEM, directive.define().getDirectiveName()) == null) {
continue;
}
List<EntityCountMetric> countMetrics = new ArrayList<>();
Expand Down

0 comments on commit ddf3059

Please sign in to comment.