public class SolrSlf4jReporter extends FilteringSolrMetricReporter
Slf4jReporter
.
The following init arguments are supported:
period
: (optional, int) number of seconds between reports, default is 60,prefix
: (optional, str) prefix for metric names, in addition to
registry name. Default is none, ie. just registry name.filter
: (optional, str) if not empty only metric names that start
with this value will be reported, default is all metrics from a registry,logger
: (optional, str) logger name to use. Default is the
metrics group, eg. solr.jvm
, solr.core
, etcfilters
enabled, metricManager, period, pluginInfo, registryName
Constructor and Description |
---|
SolrSlf4jReporter(SolrMetricManager metricManager,
String registryName)
Create a SLF4J reporter for metrics managed in a named registry.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
doInit()
Reporter initialization implementation.
|
void |
setLogger(String logger) |
void |
setPrefix(String prefix) |
protected void |
validate()
Validates that the reporter has been correctly configured.
|
newMetricFilter, setFilter, setFilter
getPeriod, getPluginInfo, init, setEnabled, setPeriod, toString
public SolrSlf4jReporter(SolrMetricManager metricManager, String registryName)
metricManager
- metric manager instance that manages the selected registryregistryName
- registry to use, one of registries managed by
SolrMetricManager
public void setPrefix(String prefix)
public void setLogger(String logger)
protected void doInit()
SolrMetricReporter
doInit
in class SolrMetricReporter
protected void validate() throws IllegalStateException
SolrMetricReporter
validate
in class SolrMetricReporter
IllegalStateException
- if the reporter is not properly configuredpublic void close() throws IOException
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.