mlbiscoc opened a new pull request, #3384:
URL: https://github.com/apache/solr/pull/3384

   Integrate OTEL into `SolrMetricManager` and `SolrMetricContext` and update 
the`wt=prometheus` endpoint to output Prometheus metrics from OTEL. This still 
keeps Dropwizard in parallel for now as removing many of its functions breaks 
many tests and the scope of this PR gets too large in changes.
   
   To summarize all changes below:
   1. `SolrMetricManager` and `SolrMetricContext` can be used to create OTEL 
meter instruments such as a `LongCounter` to record metrics.
   2. `SolrMetricProducer#initializeMetrics` takes a set of `Attributes` that 
can be used with initializing OTEL metrics eventually replacing scope.
   3. Created `AttributedLongCounter`, `AttributedDoubleCounter`, etc. This 
binds a set of attributes to a metric working similarly to how Dropwizard 
initializes. This also avoids having to rebuild Attributes every time metrics 
were to be captured.
   4. Add OTEL equivalent metric capturing from Dropwizard into 
`RequestHandlerBase` by updating its `initializeMetrics` and its corresponding  
`RequestHandlerBaseTest`
   5. `PrometheusResponseWriter` and `PrometheusFormatter` code completely 
removed as OTEL->Prometheus exporter already exists with the OTEL SDK.
   6. A number of `TODO` comments of what and where work is still needed for 
OTEL migration
   
   Sample Prometheus output from `admin/metrics?wt=prometheus` OTEL -> 
Prometheus
   
   ```
   
solr_metrics_core_requests_total{category="QUERY",collection="foobar",core="foobar_shard1_replica_n1",internal="true",otel_scope_name="solr.core.foobar.shard1.replica_n1",replica="replica_n1",scope="/select",shard="shard1",type="requests"}
 0.0
   
solr_metrics_core_requests_total{category="QUERY",collection="foobar",core="foobar_shard1_replica_n1",internal="true",otel_scope_name="solr.core.foobar.shard1.replica_n1",replica="replica_n1",scope="/select",shard="shard1",type="serverErrors"}
 0.0
   
solr_metrics_core_requests_total{category="QUERY",collection="foobar",core="foobar_shard1_replica_n1",internal="true",otel_scope_name="solr.core.foobar.shard1.replica_n1",replica="replica_n1",scope="/select",shard="shard1",type="timeouts"}
 0.0
   
solr_metrics_core_requests_total{category="QUERY",collection="foobar",core="foobar_shard1_replica_n1",internal="true",otel_scope_name="solr.core.foobar.shard1.replica_n1",replica="replica_n1",scope="/terms",shard="shard1",type="clientErrors"}
 0.0
   
solr_metrics_core_requests_total{category="QUERY",collection="foobar",core="foobar_shard1_replica_n1",internal="true",otel_scope_name="solr.core.foobar.shard1.replica_n1",replica="replica_n1",scope="/terms",shard="shard1",type="errors"}
 0.0
   ```


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