jtuglu1 commented on code in PR #18855:
URL: https://github.com/apache/druid/pull/18855#discussion_r2634511038


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/stats/TaskRealtimeMetricsMonitor.java:
##########
@@ -25,21 +25,27 @@
 import org.apache.druid.java.util.metrics.AbstractMonitor;
 import org.apache.druid.segment.incremental.RowIngestionMeters;
 import org.apache.druid.segment.incremental.RowIngestionMetersTotals;
+import org.apache.druid.segment.incremental.ThrownAwayReason;
 import org.apache.druid.segment.realtime.SegmentGenerationMetrics;
 
+import java.util.EnumMap;
+import java.util.Map;
+
 /**
  * Emits metrics from {@link SegmentGenerationMetrics} and {@link 
RowIngestionMeters}.
  */
 public class TaskRealtimeMetricsMonitor extends AbstractMonitor
 {
   private static final EmittingLogger log = new 
EmittingLogger(TaskRealtimeMetricsMonitor.class);
+  private static final String REASON_DIMENSION = "reason";
 
   private final SegmentGenerationMetrics segmentGenerationMetrics;
   private final RowIngestionMeters rowIngestionMeters;
   private final ServiceMetricEvent.Builder builder;
 
   private SegmentGenerationMetrics previousSegmentGenerationMetrics;
   private RowIngestionMetersTotals previousRowIngestionMetersTotals;
+  private Map<ThrownAwayReason, Long> previousThrownAwayByReason;

Review Comment:
   Do we want to be passing this in the serialized `RowIngestionMetersTotals` 
payload back-and-forth? AFAIK this is used to populate UI, etc. For backwards 
compatibility, I can keep both `thrownAway` and `thrownAwayByReason` as 
parameters to a `RowIngestionMetersTotals`, but just `@JsonIgnore` it for now. 
If needed, it can be added to the payload.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to