asafm commented on code in PR #896:
URL: https://github.com/apache/pulsar-site/pull/896#discussion_r1623250539


##########
docs/reference-metrics-opentelemetry.md:
##########
@@ -402,3 +402,125 @@ The number of pending topic load operations in the 
broker. When it reaches thres
 The maximum number of pending topic load operations in the broker. Equal to 
"maxConcurrentTopicLoadRequest" defined in broker.conf.
 * Type: UpDownCounter
 * Unit: `{operation}`
+
+### Consumer metrics
+
+#### pulsar.broker.consumer.message.outgoing.count
+The total number of messages dispatched to this consumer.
+* Type: Counter
+* Unit: `{message}`
+* Attributes:

Review Comment:
   @dragosvictor Aren't those attributes bigger than existing consumer 
attributes?
   Existing:
   ```
       private static void writeConsumerMetric(PrometheusMetricStreams stream, 
String metricName, Number value,
                                               String cluster, String 
namespace, String topic, String subscription,
                                               Consumer consumer, boolean 
splitTopicAndPartitionIndexLabel) {
           writeTopicMetric(stream, metricName, value, cluster, namespace, 
topic, splitTopicAndPartitionIndexLabel,
                   "subscription", subscription, "consumer_name", 
consumer.consumerName(),
                   "consumer_id", String.valueOf(consumer.consumerId()));
       }
   ```
   
   Here:
   ```
           messageOutCounter = meter
                   .counterBuilder(MESSAGE_OUT_COUNTER)
                   .setUnit("{message}")
                   .setDescription("The total number of messages dispatched to 
this consumer.")
                   .buildObserver();
   ````
   You haven't used the advice to limit the number of attributes exported, so 
by default all attributed mentioned here will be exported.
   
   The cardinality of those consumer metrics is super high: Client address for 
example. 
   Connected_since should never be used as an attribute, regardless of it being 
super high cardinality.
   



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

Reply via email to