yyj8 commented on PR #18116:
URL: https://github.com/apache/pulsar/pull/18116#issuecomment-1304806699
> I'm commenting here since the same discussion is happening in two unique
comments.
>
> You have decided to re-use the same metric name, but with removing the
namespace dimension. So we would something like in case we turn on topic level
metrics:
>
> `pulsar_rate_in{host="brokerA"}` - broker-level rate in
`pulsar_rate_in{host="brokerA" namespace="ns1" topic="topic10"} ` - topic level
rate in
>
> This creates duplication when users will use it. Say you wanted to see
your cluster rate in, you would something like `sum(pulsar_rate_in)`, but this
sum two things:
>
> 1. Topic level rate in, across all brokers.
> 2. Broker level rate in, across all brokers
>
> So, in effect, the rate would be doubled.
>
> The idea is that the metric is divided into one granularity level, be it
(namespace, topic) or (namespace) so that sum by any dimension they wish. You
can't report two granularity level of any metric under the same name.
>
> Your previous version of adding another metric name and explicitly stating
its broker level metric pulsar_broker_rate_in makes more sense.
>
> IMO, it must be changed back, unless I'm missing something.
Yes, It is possible to double the rate.
If the user uses the following query, double rate will appear:
sum(pulsar_rate_in)
If the user uses the following query, there will be no double rate:
sum(pulsar_rate_in{namespace=""})
[@codelipenghui ] and
[michaeljmarshall](https://github.com/michaeljmarshall) their suggestion is not
to add new metrics names. Indeed, each of the two methods has its own
advantages and disadvantages.
I also tend to use new metrics names, like this pulsar_broker_rate_in. In
other words, you can discuss with [@codelipenghui ] and
[michaeljmarshall](https://github.com/michaeljmarshall) which solution we will
use is a better choice.
Thank you very much.
--
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]