michaeljmarshall commented on code in PR #20498:
URL: https://github.com/apache/pulsar/pull/20498#discussion_r1221762974
##########
pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchClient.java:
##########
@@ -56,8 +58,18 @@ public class ElasticSearchClient implements AutoCloseable {
final AtomicReference<Exception> irrecoverableError = new
AtomicReference<>();
private final IndexNameFormatter indexNameFormatter;
- public ElasticSearchClient(ElasticSearchConfig elasticSearchConfig) {
+ // sink metrics
+ public static final String METRICS_TOTAL_INCOMING =
"_elasticsearch_total_incoming_";
Review Comment:
> 1. The metric name goes as a label into a Prometheus Summary collector.
Why the `_` prefix?
Great point @asafm. I had assumed these were metrics names, not label names.
Here is the generation code and it supports that it is in fact a label name:
https://github.com/apache/pulsar/blob/b1822ed2b4714e4b485ab695eb1d52634ecc8db4/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java#L212-L222
We should remove the prefix and suffix of the `_`.
--
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]