Github user janhoy commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/457#discussion_r222759139
  
    --- Diff: 
solr/core/src/java/org/apache/solr/security/AuthenticationPlugin.java ---
    @@ -20,16 +20,44 @@
     import javax.servlet.ServletRequest;
     import javax.servlet.ServletResponse;
     import java.io.Closeable;
    +import java.util.Arrays;
     import java.util.Map;
    +import java.util.Set;
    +import java.util.concurrent.ConcurrentHashMap;
    +
    +import com.codahale.metrics.Counter;
    +import com.codahale.metrics.Meter;
    +import com.codahale.metrics.MetricRegistry;
    +import com.codahale.metrics.Timer;
    +import org.apache.solr.core.SolrInfoBean;
    +import org.apache.solr.metrics.SolrMetricManager;
    +import org.apache.solr.metrics.SolrMetricProducer;
     
     /**
      * 
      * @lucene.experimental
      */
    -public abstract class AuthenticationPlugin implements Closeable {
    +public abstract class AuthenticationPlugin implements Closeable, 
SolrInfoBean, SolrMetricProducer {
    --- End diff --
    
    I chose to add the `SolrMetricsProducer` on the base class instead of 
letting each Auth plugin choose to implement it or not. The effect will be that 
plugins that do not change their code to increment counters will be logged as 0 
for these counters. But the `requests` count, `requestTimes` stats, `totalTime` 
and `errors` will still be logged by the base class on behalf of all plugins 
even if they don't increment the other counters.


---

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

Reply via email to