sigram commented on a change in pull request #825: SOLR-13677 All Metrics
Gauges should be unregistered by the objects that registered them
URL: https://github.com/apache/lucene-solr/pull/825#discussion_r312869842
##########
File path: solr/core/src/java/org/apache/solr/handler/RequestHandlerBase.java
##########
@@ -145,8 +145,14 @@ public void init(NamedList args) {
}
+ protected MetricsInfo metricsInfo;
+
+
@Override
public void initializeMetrics(SolrMetricManager manager, String
registryName, String tag, final String scope) {
+ metricsInfo = new MetricsInfo(manager, registryName,
getUniqueMetricTag(tag)) ;
+ tag = metricsInfo.getTag();
Review comment:
This pattern now repeats itself basically in every component, which puts the
burden on the developer and opens room for error. I think it would be much
better if the framework was responsible for this part behind the scenes.
I'm not sure about whether we need `MetricsInfo` class at all ... or maybe
it should be created elsewhere and passed as an argument?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]