[ 
https://issues.apache.org/jira/browse/SOLR-17436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050948#comment-18050948
 ] 

Isabelle Giguere commented on SOLR-17436:
-----------------------------------------

M'well ... Shows how little I knew about metrics before getting into this.

The V1 API supports 2 'wt' : `prometheus` and `openmetrics` 

Both return a plain text response:
{noformat}
# TYPE solr_core_requests counter
# HELP solr_core_requests HTTP Solr requests
solr_core_requests_total{category="QUERY",collection="test",core="test_shard1_replica_n1",handler="/select",internal="false",otel_scope_name="org.apache.solr",replica_type="NRT",shard="shard1"}
 1.0
solr_core_requests_total{category="ADMIN",collection="test",core="test_shard1_replica_n1",handler="/config",otel_scope_name="org.apache.solr",replica_type="NRT",shard="shard1"}
 2.0 {noformat}

The new V2 JAX-RS APIs expect to return some extension of SolrJerseyResponse.
There's a code generator (Mustache) in SolrJ, that creates new classes based on 
the solr-api interface and the request handler class. I have no idea how this 
works, or why.  Bottom line: if I create interface MetricsAPI with a method to 
return a generic jakarta.ws.rs.core.Response, containing either Json or Text, 
then, the "Mustache" fails to generate a compilable class... and boom!
If the method in the new interface MetricsAPI returns a SolrJerseyResponse, 
then, the response only contains metadata (the names of the Prometheus fields).
I need to see if I can insert a "blob" somewhere...

> Create a v2 equivalent for /admin/metrics
> -----------------------------------------
>
>                 Key: SOLR-17436
>                 URL: https://issues.apache.org/jira/browse/SOLR-17436
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Matthew Biscocho
>            Priority: Major
>
> The /admin/metrics API has no equivalent in the v2 paradigm.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to