There’s basic metrics support for request timings and number of exceptions. You can provide your own implementation of io.ino.solrs.Metrics or use the CodaHaleMetrics class shipped with solrs if you’re just happy with this metrics library :-)

To configure solrs with the Metrics implementation pass an initialized instance like this:

val solr = AsyncSolrClient.Builder("http://localhost:8983/solr/collection1")
  .withMetrics(new CodaHaleMetrics())
Full source at GitHub

If you’re using Coda Hale’s Metrics library and you want to reuse an existing MetricsRegistry, just pass it to the CodaHaleMetrics class: new CodaHaleMetrics(registry).

The source code for this page can be found here.