mlbiscoc commented on code in PR #3745:
URL: https://github.com/apache/solr/pull/3745#discussion_r2417942735


##########
solr/core/src/java/org/apache/solr/handler/admin/MetricsHandler.java:
##########
@@ -141,34 +120,12 @@ public void handleRequestBody(SolrQueryRequest req, 
SolrQueryResponse rsp) throw
   }
 
   private void handleRequest(SolrParams params, BiConsumer<String, Object> 
consumer) {
-    NamedList<Object> response;
-
     if (!enabled) {
       consumer.accept("error", "metrics collection is disabled");
       return;
     }
 
-    // NOCOMMIT SOLR-17458: Make this the default option after dropwizard 
removal
-    if (PROMETHEUS_METRICS_WT.equals(params.get(CommonParams.WT))
-        || OPEN_METRICS_WT.equals(params.get(CommonParams.WT))) {
-      handlePrometheusRequest(params, consumer);
-      return;
-    }
-
-    String[] keys = params.getParams(KEY_PARAM);
-    if (keys != null && keys.length > 0) {
-      handleKeyRequest(keys, consumer);
-      return;
-    }
-    String[] exprs = params.getParams(EXPR_PARAM);
-    if (exprs != null && exprs.length > 0) {
-      handleExprRequest(exprs, consumer);
-      return;
-    }
-
-    response = handleDropwizardRegistry(params);
-
-    consumer.accept("metrics", response);
+    handlePrometheusRequest(params, consumer);

Review Comment:
   One thing I couldn't figure out here is how do we default the response to 
the PrometheusResponseWriter without `wt`? Other option I was thinking is we 
require the wt parameter with either `prometheus` or `openmetrics` and throw an 
exception otherwise. This would keep it verbose so you know if which format you 
are reading.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to