Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/967#discussion_r179923960
  
    --- Diff: 
metron-analytics/metron-profiler/src/main/java/org/apache/metron/profiler/bolt/KafkaEmitter.java
 ---
    @@ -58,19 +61,48 @@ public void declareOutputFields(OutputFieldsDeclarer 
declarer) {
       @Override
       public void emit(ProfileMeasurement measurement, OutputCollector 
collector) {
     
    -    JSONObject message = new JSONObject();
    -    message.put("profile", measurement.getDefinition().getProfile());
    -    message.put("entity", measurement.getEntity());
    -    message.put("period", measurement.getPeriod().getPeriod());
    -    message.put("period.start", 
measurement.getPeriod().getStartTimeMillis());
    -    message.put("period.end", measurement.getPeriod().getEndTimeMillis());
    -    message.put("timestamp", System.currentTimeMillis());
    -    message.put("source.type", sourceType);
    -    message.put("is_alert", "true");
    +    // only need to emit, if there are triage values
    +    Map<String, Object> triageValues = measurement.getTriageValues();
    +    if(MapUtils.isNotEmpty(triageValues)) {
    --- End diff --
    
    This is the core of the fix.  We only need to emit if there are triage 
values.


---

Reply via email to