9aman commented on code in PR #17163:
URL: https://github.com/apache/pinot/pull/17163#discussion_r2513813441
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -385,18 +386,43 @@ public void createMetrics(int partitionId) {
}
_serverMetrics.setOrUpdatePartitionGauge(_metricName, partitionId,
ServerGauge.REALTIME_INGESTION_DELAY_MS,
() -> getPartitionIngestionDelayMs(partitionId));
+ _serverMetrics.setOrUpdatePartitionGauge(_metricName, partitionId,
+ ServerGauge.END_TO_END_REALTIME_INGESTION_DELAY_MS, () ->
getPartitionEndToEndIngestionDelayMs(partitionId));
+
+ LOGGER.info("Successfully created ingestion metrics for partition id: {}",
partitionId);
+ }
+
+ private void removeMetrics(int partitionId) {
+ int streamConfigIndex =
IngestionConfigUtils.getStreamConfigIndexFromPinotPartitionId(partitionId);
+ StreamMetadataProvider streamMetadataProvider =
+ _streamConfigIndexToStreamMetadataProvider.get(streamConfigIndex);
+ // Remove all metrics associated with this partition
+ if (streamMetadataProvider != null &&
streamMetadataProvider.supportsOffsetLag()) {
+ _serverMetrics.removePartitionGauge(_metricName, partitionId,
ServerGauge.REALTIME_INGESTION_OFFSET_LAG);
+ _serverMetrics.removePartitionGauge(_metricName, partitionId,
ServerGauge.REALTIME_INGESTION_UPSTREAM_OFFSET);
+ _serverMetrics.removePartitionGauge(_metricName, partitionId,
+ ServerGauge.REALTIME_INGESTION_CONSUMING_OFFSET);
+ }
+ _serverMetrics.removePartitionGauge(_metricName, partitionId,
ServerGauge.REALTIME_INGESTION_DELAY_MS);
+ _serverMetrics.removePartitionGauge(_metricName, partitionId,
+ ServerGauge.END_TO_END_REALTIME_INGESTION_DELAY_MS);
+
+ LOGGER.info("Successfully removed ingestion metrics for partition id: {}",
partitionId);
Review Comment:
Thanks for adding these logs with partition level info.
--
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]