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_r313737953
 
 

 ##########
 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:
   We can change it in 9.0 - how about this for 8x, in `SolrMetricProducer`:
   ```
   default void initializeMetrics(MetricsInfo info, scope) {
     initializeMetrics(info.manager, info.registry, info.tag, scope);
   }
   ```
   Then we can change the components that we know about to use the new API (and 
create the tags not in the component itself but in the parent), and still 
preserve back-compat for third-party components.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to