alexandrebrg commented on code in PR #24675:
URL: https://github.com/apache/pulsar/pull/24675#discussion_r2329764469


##########
pip/pip-438.md:
##########
@@ -0,0 +1,71 @@
+# PIP-437: Add namespace topics limit metric
+
+# Background knowledge
+
+Pulsar namespaces can be configured with a maximum number of topics. When this 
limit is reached, producers fail to create new topics. Currently, operators 
lack visibility into namespace topic limits through metrics.
+
+# Motivation
+
+Operators cannot proactively monitor namespace capacity because there's no 
metric exposing the configured topic limit. This leads to reactive 
troubleshooting when producers start failing.
+
+# Goals
+
+## In Scope
+
+- Add `pulsar_namespace_max_topics_limit` metric exposing the configured 
maximum topics limit for each namespace
+- Include cluster and namespace labels for correlation with existing topic 
count metrics
+
+## Out of Scope
+
+# High Level Design
+
+Add a new gauge metric that exposes the configured maximum topics limit for 
each namespace. It will be calculated on
+each export of metrics.
+
+# Detailed Design
+
+## Design & Implementation Details
+
+- Create method `getNamespaceTopicLimit` method in `NamespaceStatsAggregator`, 
fetching from namespace policies their 
+  max topics limit, falling back to the default value set in the broker 
configuration
+- Create method `printNamespaceTopicLimitStats` in `NamespaceStatsAggregator` 
to print the configured limit for each
+  namespace

Review Comment:
   I believe this PIP might have been misunderstood, we are looking to 
implement a metric for each namespace where it would give insight on the 
maximum number of topics that can be created in a namespace (which is either a 
namespace policy related value or broker default configuration value).
   
   I understand that a namespace can be bundled and the namespace can be 
scattered between multiple brokers, isn't there a way to determine a "leader" 
broker for a namespace based on the topics loaded ? Or any metadata related to 
it ? (e.g. bundleId if it exists?)
   
   



-- 
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