congbobo184 commented on code in PR #15140:
URL: https://github.com/apache/pulsar/pull/15140#discussion_r849060142
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/TopicStats.java:
##########
@@ -42,6 +42,9 @@ class TopicStats {
long bytesOutCounter;
double averageMsgSize;
+ long ongoingTxnCount;
Review Comment:
because topic transaction stats need transaction buffer stats and pending
ack stats, so I think it only represent tb ongoingTxnCount
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/TopicStats.java:
##########
@@ -127,6 +133,11 @@ static void printTopicStats(SimpleTextOutputStream stream,
String cluster, Strin
metric(stream, cluster, namespace, topic, "pulsar_average_msg_size",
stats.averageMsgSize,
splitTopicAndPartitionIndexLabel);
+ metric(stream, cluster, namespace, topic,
"pulsar_onging_transaction_count", stats.ongoingTxnCount,
Review Comment:
pulsar_txn_ tb_active_count
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/TopicStats.java:
##########
@@ -127,6 +133,11 @@ static void printTopicStats(SimpleTextOutputStream stream,
String cluster, Strin
metric(stream, cluster, namespace, topic, "pulsar_average_msg_size",
stats.averageMsgSize,
splitTopicAndPartitionIndexLabel);
+ metric(stream, cluster, namespace, topic,
"pulsar_onging_transaction_count", stats.ongoingTxnCount,
+ splitTopicAndPartitionIndexLabel);
+ metric(stream, cluster, namespace, topic,
"pulsar_abort_transaction_count", stats.abortTxnCount,
Review Comment:
should add pulsar_txn_tb_committed_count
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/TopicStats.java:
##########
@@ -127,6 +133,11 @@ static void printTopicStats(SimpleTextOutputStream stream,
String cluster, Strin
metric(stream, cluster, namespace, topic, "pulsar_average_msg_size",
stats.averageMsgSize,
splitTopicAndPartitionIndexLabel);
+ metric(stream, cluster, namespace, topic,
"pulsar_onging_transaction_count", stats.ongoingTxnCount,
+ splitTopicAndPartitionIndexLabel);
+ metric(stream, cluster, namespace, topic,
"pulsar_abort_transaction_count", stats.abortTxnCount,
Review Comment:
pulsar_txn_ tb_aborted_count
--
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]