mlbiscoc commented on code in PR #3745:
URL: https://github.com/apache/solr/pull/3745#discussion_r2420230405
##########
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:
Will probably default to prometheus in that case then. My question though
was actually how do you implement this to go to the PrometheusResponseWriter
without `wt` parameter since it seems to always default to the
JacksonJsonWriter otherwise?
--
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]