tjiuming commented on a change in pull request #13833:
URL: https://github.com/apache/pulsar/pull/13833#discussion_r791366735
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
##########
@@ -160,6 +169,46 @@ private static void
generateBrokerBasicMetrics(PulsarService pulsar, SimpleTextO
clusterName, Collector.Type.GAUGE, stream);
}
+
+ private static void generateLedgerOffloaderMetrics(PulsarService pulsar,
SimpleTextOutputStream stream,
+ boolean
includeTopicMetrics) {
+ List<Metrics> metricList = new LinkedList<>();
+ if (includeTopicMetrics) {
+
pulsar.getBrokerService().getMultiLayerTopicMap().forEach((namespace,
bundlesMap) -> {
+ bundlesMap.forEach((bundle, topicsMap) -> {
+ topicsMap.forEach((topicName, topic) -> {
+ if (topic instanceof PersistentTopic) {
+ try {
+ List<Metrics> metrics =
Review comment:
yep, you are right, maybe the offloader of topic is instance of
`NullLedgerOffloader`. But it won't cause error
--
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]