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 String
DEFAULT_MAX_ANNOTATIONS
static String
DEFAULT_MAX_ATTRIBUTES
static String
DEFAULT_SAMPLER_PROB
static String
DEFAULT_SERVICE
static Duration
DEFAULT_TIMEOUT
static String
MAX_ANNOTATIONS_OPTION
static String
MAX_ATTRIBUTES_OPTION
protected Map<String,String>
options
protected long
pollInterval
static String
SAMPLER_PROB_OPTION
static String
SERVICE_OPTION
static String
TIMEOUT_OPTION
static String
URL_OPTION
-
Constructor Summary
Constructors Constructor Description AbstractMetricsReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableTracing()
protected String
getCurrentHostname()
protected String
getHostnameFromNuxeoUrl()
protected String
getOption(String name, String defaultValue)
protected boolean
getOptionAsBoolean(String name, boolean defaultValue)
protected int
getOptionAsInt(String name, int defaultValue)
protected long
getPollInterval()
void
init(long pollInterval, Map<String,String> options)
Called on new instance.protected String
requireOption(String name)
protected String
requireOption(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:MetricsReporter
Called on new instance.- Specified by:
init
in 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)
-
-