Package org.nuxeo.runtime.metrics
Class MetricsServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.metrics.MetricsServiceImpl
- All Implemented Interfaces:
MetricsService
,Adaptable
,Component
,Extensible
,TimestampedService
-
Field Summary
Modifier and TypeFieldDescriptionprotected io.dropwizard.metrics5.log4j2.InstrumentedAppender
protected MetricsConfigurationDescriptor
protected static final String
protected final io.dropwizard.metrics5.Counter
protected io.dropwizard.metrics5.MetricRegistry
protected static final String
protected List<MetricsReporterDescriptor>
protected List<MetricsReporter>
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.void
deactivate
(ComponentContext context) Deactivates the component.protected void
instrumentJvm
(boolean activate) protected void
instrumentLog4j
(boolean activate) protected void
instrumentTomcat
(boolean activate) protected boolean
protected void
registerTomcatGauge
(String mbean, String attribute, io.dropwizard.metrics5.MetricRegistry registry, String name) void
start
(ComponentContext context) Start the component.void
void
stop
(ComponentContext context) Stop the component.void
protected void
updateInstrumentation
(List<MetricsConfigurationDescriptor.InstrumentDescriptor> instruments, boolean activate) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtension
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.model.Component
getApplicationStartedOrder
-
Field Details
-
CONFIGURATION_EP
- See Also:
-
REPORTER_EP
- See Also:
-
registry
protected io.dropwizard.metrics5.MetricRegistry registry -
instanceUp
protected final io.dropwizard.metrics5.Counter instanceUp -
config
-
reporterConfigs
-
reporters
-
appender
protected io.dropwizard.metrics5.log4j2.InstrumentedAppender appender
-
-
Constructor Details
-
MetricsServiceImpl
public MetricsServiceImpl()
-
-
Method Details
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
- Specified by:
activate
in interfaceComponent
- Overrides:
activate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Overrides:
deactivate
in classDefaultComponent
- Parameters:
context
- the runtime context
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
stop
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Overrides:
stop
in classDefaultComponent
-
metricEnabled
protected boolean metricEnabled() -
startReporters
public void startReporters()- Specified by:
startReporters
in interfaceMetricsService
-
stopReporters
public void stopReporters()- Specified by:
stopReporters
in interfaceMetricsService
-
updateInstrumentation
protected void updateInstrumentation(List<MetricsConfigurationDescriptor.InstrumentDescriptor> instruments, boolean activate) -
instrumentLog4j
protected void instrumentLog4j(boolean activate) -
registerTomcatGauge
-
instrumentTomcat
protected void instrumentTomcat(boolean activate) -
instrumentJvm
protected void instrumentJvm(boolean activate)
-