Package org.nuxeo.runtime.metrics
Class AbstractMetricsReporter
- java.lang.Object
-
- org.nuxeo.runtime.metrics.AbstractMetricsReporter
-
- All Implemented Interfaces:
MetricsReporter
- Direct Known Subclasses:
DatadogReporter,DatadogTraceReporter,GraphiteReporter,JaegerReporter,JmxReporter,PrometheusReporter,StackdriverReporter,StackdriverTraceReporter,StreamMetricsNuxeoReporter,ZipkinReporter,ZPageReporter
public abstract class AbstractMetricsReporter extends Object implements MetricsReporter
- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_MAX_ANNOTATIONSstatic StringDEFAULT_MAX_ATTRIBUTESstatic StringDEFAULT_SAMPLER_PROBstatic StringDEFAULT_SERVICEstatic DurationDEFAULT_TIMEOUTstatic StringMAX_ANNOTATIONS_OPTIONstatic StringMAX_ATTRIBUTES_OPTIONprotected Map<String,String>optionsprotected longpollIntervalstatic StringSAMPLER_PROB_OPTIONstatic StringSERVICE_OPTIONstatic StringTIMEOUT_OPTIONstatic StringURL_OPTION
-
Constructor Summary
Constructors Constructor Description AbstractMetricsReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenableTracing()protected StringgetCurrentHostname()protected StringgetHostnameFromNuxeoUrl()protected StringgetOption(String name, String defaultValue)protected booleangetOptionAsBoolean(String name, boolean defaultValue)protected intgetOptionAsInt(String name, int defaultValue)protected longgetPollInterval()voidinit(long pollInterval, Map<String,String> options)Called on new instance.protected StringrequireOption(String name)protected StringrequireOption(String name, String errorMessage)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.metrics.MetricsReporter
start, stop
-
-
-
-
Field Detail
-
URL_OPTION
public static final String URL_OPTION
- See Also:
- Constant Field Values
-
TIMEOUT_OPTION
public static final String TIMEOUT_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_TIMEOUT
public static final Duration DEFAULT_TIMEOUT
-
SERVICE_OPTION
public static final String SERVICE_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_SERVICE
public static final String DEFAULT_SERVICE
- See Also:
- Constant Field Values
-
MAX_ATTRIBUTES_OPTION
public static final String MAX_ATTRIBUTES_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ATTRIBUTES
public static final String DEFAULT_MAX_ATTRIBUTES
- See Also:
- Constant Field Values
-
MAX_ANNOTATIONS_OPTION
public static final String MAX_ANNOTATIONS_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ANNOTATIONS
public static final String DEFAULT_MAX_ANNOTATIONS
- See Also:
- Constant Field Values
-
SAMPLER_PROB_OPTION
public static final String SAMPLER_PROB_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_SAMPLER_PROB
public static final String DEFAULT_SAMPLER_PROB
- See Also:
- Constant Field Values
-
pollInterval
protected long pollInterval
-
-
Method Detail
-
enableTracing
public void enableTracing()
-
init
public void init(long pollInterval, Map<String,String> options)Description copied from interface:MetricsReporterCalled on new instance.- Specified by:
initin interfaceMetricsReporter
-
getCurrentHostname
protected String getCurrentHostname()
-
getPollInterval
protected long getPollInterval()
-
getHostnameFromNuxeoUrl
protected String getHostnameFromNuxeoUrl()
-
getOptionAsInt
protected int getOptionAsInt(String name, int defaultValue)
-
getOptionAsBoolean
protected boolean getOptionAsBoolean(String name, boolean defaultValue)
-
-