yyj8 opened a new pull request, #19047:
URL: https://github.com/apache/pulsar/pull/19047

   For detailed improvement instructions, please refer to issues:
   https://github.com/apache/pulsar/issues/18056
   
   # Motivation
   Currently, pulsar does not statistics broker level metrics, and all relevant 
metrics are 0 by default.
   
   When the number of topic partitions reaches more than 100000 or even 
millions, and the topic level metrics are exposed 
(exposeTopicLevelMetricsInPrometheus=true), if you want to query the metrics of 
the broker dimension, you need to summarize all topics, and the performance 
becomes very poor, or even the results cannot be queried from the promethus. 
Common broker level metrics include:
   ```
   pulsar_topics_count
   pulsar_subscriptions_count
   pulsar_producers_count
   pulsar_consumers_count
   pulsar_rate_in
   pulsar_rate_out
   pulsar_throughput_in
   pulsar_throughput_out
   pulsar_storage_size
   pulsar_storage_logical_size
   pulsar_storage_write_rate
   pulsar_storage_read_rate
   pulsar_msg_backlog
   ```
   
   We need to statistics the metrics of the broker dimension and expose them to 
prometheus to improve the performance of the monitoring of the broker 
dimension. Modify the original metrics name as follows:
   ```
   pulsar_broker_topics_count
   pulsar_broker_subscriptions_count
   pulsar_broker_producers_count
   pulsar_broker_consumers_count
   pulsar_broker_rate_in
   pulsar_broker_rate_out
   pulsar_broker_throughput_in
   pulsar_broker_throughput_out
   pulsar_broker_storage_size
   pulsar_broker_storage_logical_size
   pulsar_broker_storage_write_rate
   pulsar_broker_storage_read_rate
   pulsar_broker_msg_backlog
   ```
   
   
   - [ ] `doc` <!-- Your PR contains doc changes -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [x] `doc-complete` <!-- Docs have been already added -->


-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to