tjiuming commented on code in PR #17041:
URL: https://github.com/apache/pulsar/pull/17041#discussion_r948756814
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/stats/MetadataStoreStats.java:
##########
@@ -24,41 +24,42 @@
public final class MetadataStoreStats implements AutoCloseable {
private static final double[] BUCKETS = new double[]{1, 3, 5, 10, 20, 50,
100, 200, 500, 1000, 2000, 5000};
- private static final String LABEL_NAME = "metadata_store_name";
+ private static final String LABEL_NAME = "name";
+ protected static final String PREFIX = "pulsar_metadata_store_";
private static final Histogram GET_OPS_SUCCEED = Histogram
- .build("pulsar_metadata_store_get_ops_latency", "-")
+ .build(PREFIX + "get_latency", "-")
.unit("ms")
.buckets(BUCKETS)
.labelNames(LABEL_NAME)
.register();
private static final Histogram DEL_OPS_SUCCEED = Histogram
- .build("pulsar_metadata_store_del_ops_latency", "-")
+ .build(PREFIX + "del_latency", "-")
Review Comment:
@codelipenghui https://prometheus.io/docs/practices/naming/ you're
right, Prometheus recommend using `label` to distinguish
--
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]