ololo3000 commented on a change in pull request #8937:
URL: https://github.com/apache/ignite/pull/8937#discussion_r604766729
##########
File path:
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryStatistics.java
##########
@@ -72,13 +75,14 @@
/** */
public TcpDiscoveryStatistics() {
- joinedNodesCnt = new IntMetricImpl("JoinedNodes", "Joined nodes
count");
+ joinedNodesCnt = new IntMetricImpl(metricName(DISCO_METRICS,
"JoinedNodes"), "Joined nodes count");
Review comment:
From my point of view it's better to just get rid of
MetricRegistry#register(Metric) method. It is only used in case when we can't
obtain metric registry but already need to collect metric value. And I think it
can be replaced with MetricRegistry#register(String, IntSupplier, String) and
analogs. In this case, the metrics registry will encapsulate the logic for
creating and naming metrics. WDYT?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]