lhotari commented on code in PR #22952:
URL: https://github.com/apache/pulsar/pull/22952#discussion_r1650664706
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/stats/BatchMetadataStoreStats.java:
##########
@@ -69,15 +75,25 @@ public BatchMetadataStoreStats(String metadataStoreName,
ExecutorService executo
EXECUTOR_QUEUE_SIZE.setChild(new Gauge.Child() {
@Override
public double get() {
- return BatchMetadataStoreStats.this.executor == null ? 0 :
-
BatchMetadataStoreStats.this.executor.getQueue().size();
+ return getQueueSize();
}
}, metadataStoreName);
this.batchOpsWaitingChild = OPS_WAITING.labels(metadataStoreName);
this.batchExecuteTimeChild =
BATCH_EXECUTE_TIME.labels(metadataStoreName);
this.opsPerBatchChild = OPS_PER_BATCH.labels(metadataStoreName);
+ var meter = openTelemetry.getMeter("org.apache.pulsar");
+ var attributes = Attributes.of(MetadataStoreStats.METADATA_STORE_NAME,
metadataStoreName);
+ this.batchMetadataStoreSizeCounter = meter
+ .upDownCounterBuilder(EXECUTOR_QUEUE_SIZE_METRIC_NAME)
+ .setDescription("The number of blocking operations in the
metadata store executor queue")
Review Comment:
typo here? blocking -> batch?
--
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]