Fixes solr JMX metrics to use all possible MBeans instead of only first (#223)

This commit is contained in:
Stefan Kurek 2022-02-02 09:07:19 -05:00 committed by GitHub
parent eef8c17278
commit ed5c91ea2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -14,12 +14,12 @@
* limitations under the License.
*/
def beanSolrCoreSearcherNumDocs = otel.mbean("solr:dom1=core,dom2=*,category=SEARCHER,scope=searcher,name=numDocs")
def beanSolrCoreSearcherNumDocs = otel.mbeans("solr:dom1=core,dom2=*,category=SEARCHER,scope=searcher,name=numDocs")
otel.instrument(beanSolrCoreSearcherNumDocs, "solr.document.count", "The total number of indexed documents.", "{documents}",
["core" : { mbean -> mbean.name().getKeyProperty("dom2") }],
"Value", otel.&longUpDownCounterCallback)
def beanSolrCoreIndexSize = otel.mbean("solr:dom1=core,dom2=*,category=INDEX,name=sizeInBytes")
def beanSolrCoreIndexSize = otel.mbeans("solr:dom1=core,dom2=*,category=INDEX,name=sizeInBytes")
otel.instrument(beanSolrCoreIndexSize, "solr.index.size", "The total index size.", "by",
["core" : { mbean -> mbean.name().getKeyProperty("dom2") }],
"Value", otel.&longUpDownCounterCallback)
@ -58,7 +58,7 @@ otel.instrument(beanSolrCoreTimeouts, "solr.request.timeout.count", "The number
"handler" : { mbean -> mbean.name().getKeyProperty("scope") }],
"Count", otel.&longCounterCallback)
def beanSolrCoreQueryResultsCache = otel.mbean("solr:dom1=core,dom2=*,category=CACHE,scope=*,name=queryResultCache")
def beanSolrCoreQueryResultsCache = otel.mbeans("solr:dom1=core,dom2=*,category=CACHE,scope=*,name=queryResultCache")
otel.instrument(beanSolrCoreQueryResultsCache, "solr.cache.eviction.count", "The number of evictions from a cache.", "{evictions}",
["core" : { mbean -> mbean.name().getKeyProperty("dom2") },
"cache" : { mbean -> mbean.name().getKeyProperty("scope") }],