Skip to content

Commit

Permalink
Fix bug in emitting metrics for only system directives
Browse files Browse the repository at this point in the history
  • Loading branch information
vanathi-g committed Apr 26, 2023
1 parent 372eed2 commit a59a739
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 a59a739

Please sign in to comment.