com.yammer.metrics.reporting
Class MetricsServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.yammer.metrics.reporting.MetricsServlet
- All Implemented Interfaces:
- MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class MetricsServlet
- extends javax.servlet.http.HttpServlet
- implements MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- See Also:
- Serialized Form
|
Constructor Summary |
MetricsServlet()
|
MetricsServlet(boolean showJvmMetrics)
|
MetricsServlet(org.codehaus.jackson.JsonFactory factory)
|
MetricsServlet(org.codehaus.jackson.JsonFactory factory,
boolean showJvmMetrics)
|
MetricsServlet(org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri)
|
MetricsServlet(org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
|
MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
|
MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
|
MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
VirtualMachineMetrics vm,
org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
|
MetricsServlet(String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri)
|
|
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
|
void |
init(javax.servlet.ServletConfig config)
|
void |
processCounter(MetricName name,
Counter counter,
com.yammer.metrics.reporting.MetricsServlet.Context context)
|
void |
processGauge(MetricName name,
Gauge<?> gauge,
com.yammer.metrics.reporting.MetricsServlet.Context context)
|
void |
processHistogram(MetricName name,
Histogram histogram,
com.yammer.metrics.reporting.MetricsServlet.Context context)
|
void |
processMeter(MetricName name,
Metered meter,
com.yammer.metrics.reporting.MetricsServlet.Context context)
|
void |
processTimer(MetricName name,
Timer timer,
com.yammer.metrics.reporting.MetricsServlet.Context context)
|
void |
writeRegularMetrics(org.codehaus.jackson.JsonGenerator json,
String classPrefix,
boolean showFullSamples)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTR_NAME_METRICS_REGISTRY
public static final String ATTR_NAME_METRICS_REGISTRY
ATTR_NAME_HEALTHCHECK_REGISTRY
public static final String ATTR_NAME_HEALTHCHECK_REGISTRY
ATTR_NAME_VM_REGISTRY
public static final String ATTR_NAME_VM_REGISTRY
HEALTHCHECK_URI
public static final String HEALTHCHECK_URI
- See Also:
- Constant Field Values
METRICS_URI
public static final String METRICS_URI
- See Also:
- Constant Field Values
PING_URI
public static final String PING_URI
- See Also:
- Constant Field Values
THREADS_URI
public static final String THREADS_URI
- See Also:
- Constant Field Values
MetricsServlet
public MetricsServlet()
MetricsServlet
public MetricsServlet(boolean showJvmMetrics)
MetricsServlet
public MetricsServlet(org.codehaus.jackson.JsonFactory factory)
MetricsServlet
public MetricsServlet(org.codehaus.jackson.JsonFactory factory,
boolean showJvmMetrics)
MetricsServlet
public MetricsServlet(String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri)
MetricsServlet
public MetricsServlet(org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri)
MetricsServlet
public MetricsServlet(org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
MetricsServlet
public MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
MetricsServlet
public MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
MetricsServlet
public MetricsServlet(MetricsRegistry metricsRegistry,
HealthCheckRegistry healthCheckRegistry,
VirtualMachineMetrics vm,
org.codehaus.jackson.JsonFactory factory,
String healthcheckUri,
String metricsUri,
String pingUri,
String threadsUri,
boolean showJvmMetrics)
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Specified by:
init in interface javax.servlet.Servlet- Overrides:
init in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
writeRegularMetrics
public void writeRegularMetrics(org.codehaus.jackson.JsonGenerator json,
String classPrefix,
boolean showFullSamples)
throws IOException
- Throws:
IOException
processHistogram
public void processHistogram(MetricName name,
Histogram histogram,
com.yammer.metrics.reporting.MetricsServlet.Context context)
throws Exception
- Specified by:
processHistogram in interface MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- Throws:
Exception
processCounter
public void processCounter(MetricName name,
Counter counter,
com.yammer.metrics.reporting.MetricsServlet.Context context)
throws Exception
- Specified by:
processCounter in interface MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- Throws:
Exception
processGauge
public void processGauge(MetricName name,
Gauge<?> gauge,
com.yammer.metrics.reporting.MetricsServlet.Context context)
throws Exception
- Specified by:
processGauge in interface MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- Throws:
Exception
processMeter
public void processMeter(MetricName name,
Metered meter,
com.yammer.metrics.reporting.MetricsServlet.Context context)
throws Exception
- Specified by:
processMeter in interface MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- Throws:
Exception
processTimer
public void processTimer(MetricName name,
Timer timer,
com.yammer.metrics.reporting.MetricsServlet.Context context)
throws Exception
- Specified by:
processTimer in interface MetricProcessor<com.yammer.metrics.reporting.MetricsServlet.Context>
- Throws:
Exception
Copyright © 2012. All Rights Reserved.