umustafi commented on code in PR #3805:
URL: https://github.com/apache/gobblin/pull/3805#discussion_r1370671865
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java:
##########
@@ -217,7 +217,16 @@ protected void submitFlowToDagManagerHelper(String
flowGroup, String flowName) {
@Override
protected void createMetrics() {
- super.messagesRead =
this.getMetricContext().counter(ServiceMetricNames.GOBBLIN_SERVICE_PREFIX +
RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_MESSAGES_READ);
+ super.messagesRead =
this.getMetricContext().counter(RuntimeMetrics.DAG_ACTION_STORE_MONITOR_PREFIX
+ "." + RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_MESSAGES_READ);
+ super.queueSizeGauges = new ContextAwareGauge[super.numThreads];
+ for (int i=0; i < numThreads; i++) {
+ // An 'effectively' final variable is needed inside the lambda
expression below
+ int finalI = i;
+ this.queueSizeGauges[i] = this.getMetricContext().newContextAwareGauge(
+ RuntimeMetrics.GOBBLIN_KAFKA_HIGH_LEVEL_CONSUMER_QUEUE_SIZE_PREFIX +
"-" + i,
+ () -> super.queues[finalI].size());
+ }
Review Comment:
Oh oops I overwrote the important piece of the code, but I need to add the
`gobblin.service` and `dagActionMonitor` prefix to actually report this metric
and be able to distinguish it from any other classes that use
`HighLevelConsumer`
--
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]