diff --git a/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java b/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java index 9da3101003c..8425aa97fe2 100644 --- a/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java +++ b/processing/src/main/java/io/druid/query/MetricsEmittingQueryRunner.java @@ -69,6 +69,11 @@ public class MetricsEmittingQueryRunner implements QueryRunner public Sequence run(final Query query) { final ServiceMetricEvent.Builder builder = builderFn.apply(query); + String queryId = query.getId(); + if (queryId == null) { + queryId = ""; + } + builder.setUser8(queryId); return new Sequence() { diff --git a/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java index 543ec0ba130..0f032f50121 100644 --- a/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java @@ -169,8 +169,7 @@ public class GroupByQueryQueryToolChest extends QueryToolChest