-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add CircuitBreaker timesTripped metric #203
add CircuitBreaker timesTripped metric #203
Conversation
Reworking this a bit, will update when ready for review again. |
Okay this is ready for review again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
QQ: it does add node name as label some where? |
I believe all Solr metrics have nodename added to them automatically as a label later on in the pipeline. For example, |
Confirmed this by deploying to playpen. |
* add CircuitBreaker timesTripped metric * remove String.format * toLowerCase add locale * tidy * move metrics management to its own map * use stdlib Map.copyOf * tidy (cherry picked from commit 9302dcf)
* add CircuitBreaker timesTripped metric * remove String.format * toLowerCase add locale * tidy * move metrics management to its own map * use stdlib Map.copyOf * tidy (cherry picked from commit 9302dcf)
* add CircuitBreaker timesTripped metric * remove String.format * toLowerCase add locale * tidy * move metrics management to its own map * use stdlib Map.copyOf * tidy (cherry picked from commit 9302dcf)
This PR adds a metric for each CircuitBreaker that is configured in Solr. The metrics are named like so:
All metrics from every CircuitBreaker of the same class and request type are rolled up into this one metric, and reported through the PrometheusMetricsServlet.
Testing
Tested by adding this to a config on my local machine:
Then, issuing some requests to a collection, and seeing the circuit breaker activate. Then, I checked
http://localhost:8983/solr/metrics
to make sure this showed up:Also tested that Solr functions as normal when no CircuitBreakers are configured.