mirror of https://github.com/apache/druid.git
Fix service tag by avoiding using a reserved tag name (#8472)
This commit is contained in:
parent
bffaca672a
commit
7f28561d17
|
@ -103,7 +103,7 @@ public class StatsDEmitter implements Emitter
|
||||||
ImmutableMap.Builder<String, String> dimsBuilder = new ImmutableMap.Builder<>();
|
ImmutableMap.Builder<String, String> dimsBuilder = new ImmutableMap.Builder<>();
|
||||||
|
|
||||||
if (config.isDogstatsd() && config.isDogstatsdServiceAsTag()) {
|
if (config.isDogstatsd() && config.isDogstatsdServiceAsTag()) {
|
||||||
dimsBuilder.put("service", service);
|
dimsBuilder.put("druid_service", service);
|
||||||
nameBuilder.add(DRUID_DEFAULT_PREFIX);
|
nameBuilder.add(DRUID_DEFAULT_PREFIX);
|
||||||
} else {
|
} else {
|
||||||
nameBuilder.add(service);
|
nameBuilder.add(service);
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class StatsDEmitterTest
|
||||||
client
|
client
|
||||||
);
|
);
|
||||||
client.time("druid.query.time", 10,
|
client.time("druid.query.time", 10,
|
||||||
"service:druid/broker", "dataSource:data-source", "type:groupBy", "hostname:brokerHost1"
|
"druid_service:druid/broker", "dataSource:data-source", "type:groupBy", "hostname:brokerHost1"
|
||||||
);
|
);
|
||||||
EasyMock.replay(client);
|
EasyMock.replay(client);
|
||||||
emitter.emit(new ServiceMetricEvent.Builder()
|
emitter.emit(new ServiceMetricEvent.Builder()
|
||||||
|
|
Loading…
Reference in New Issue