You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Stephanie0002 (via GitHub)" <gi...@apache.org> on 2024/05/29 11:10:52 UTC

[I] [Feature] Add two metrics rocketmq_active_topic_number and rocketmq_active_subscription_number [rocketmq]

Stephanie0002 opened a new issue, #8223:
URL: https://github.com/apache/rocketmq/issues/8223

   ### Is Your Feature Request Related to a Problem?
   
   The existing observable system of this project lacks broker-side monitoring of the number of topic and subscription group.
   
   ### Describe the Solution You'd Like
   
   Add two metrics rocketmq_active_topic_number and rocketmq_active_subscription_number as following: 
   
   | Type      | Name   | Unit    | Description   | Label    |
   | --------- | -------------- | ----------- |-----------| ------- |
   | Gauge     | rocketmq_active_topic_number           | count       | The number of current topics    | cluster,node_type,node_id    |
   | Gauge     | rocketmq_active_subscription_number    | count       | The number of current subscription group   | cluster,node_type,node_id   |
   
   
   ### Describe Alternatives You've Considered
   
   1. **Anticipated use of gauge type metric**
   Gauge: A metric that can be incremented or decremented, used to describe the current state of a particular indicator, such as the remaining system memory.
   
   2. **Add metric variables to the BrokerMetricsManager class**: `activeTopicNum`, `activeSubGroupNum`
   
   3. **Add corresponding constants to the BrokerMetricsConstant class**
   
   4. **Build corresponding metrics inside the `initStatsMetrics` method of the BrokerMetricsManager class**
   
   5. **Write a gauge update callback function that refreshes periodically**
      a. Call `this.brokerController.topicConfigManager.getTopicConfigTable().size()` to retrieve the number of topics.
      b. Call `brokerController.getSubscriptionGroupManager().getSubscriptionGroupTable().size()` to obtain the number of subscription groups.
   
   ### Additional Context
   
   _No response_


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Add two metrics rocketmq_active_topic_number and rocketmq_active_subscription_number [rocketmq]

Posted by "humkum (via GitHub)" <gi...@apache.org>.
humkum commented on issue #8223:
URL: https://github.com/apache/rocketmq/issues/8223#issuecomment-2139380886

   Here you can only get the total number of topics and subscription groups, but cannot determine whether these topics and subscription groups are active. Would it be more accurate to call it rocketmq_total_topic_number & rocketmq_total_subscription_number?


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Feature] Add two metrics rocketmq_active_topic_number and rocketmq_active_subscription_number [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #8223: [Feature] Add two metrics rocketmq_active_topic_number and rocketmq_active_subscription_number
URL: https://github.com/apache/rocketmq/issues/8223


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org