glasser commented on a change in pull request #8546: add support for dogstatsd
events in statsd-emitter
URL: https://github.com/apache/incubator-druid/pull/8546#discussion_r325016433
##########
File path:
extensions-contrib/statsd-emitter/src/main/java/org/apache/druid/emitter/statsd/StatsDEmitter.java
##########
@@ -174,6 +177,59 @@ public void emit(Event event)
} else {
log.debug("Service=[%s], Metric=[%s] has no StatsD type mapping",
service, metric);
}
+ } else if (event instanceof AlertEvent && config.isDogstatsd()) {
+ AlertEvent alertEvent = (AlertEvent) event;
+
+ ImmutableMap.Builder<String, String> tagBuilder = ImmutableMap.builder();
+
+ tagBuilder
+ .put("feed", alertEvent.getFeed())
+ .put("service", alertEvent.getService())
+ .put("severity", alertEvent.getSeverity().toString());
+ if (config.getIncludeHost()) {
+ tagBuilder.put("hostname", alertEvent.getHost());
Review comment:
If you're changing a `"hostname"` to TAG_HOSTNAME above, do it here too?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]