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
FieldsModifier and TypeFieldDescriptionprotected io.dropwizard.metrics5.log4j2.InstrumentedAppenderprotected MetricsConfigurationDescriptorprotected static final Stringprotected final io.dropwizard.metrics5.Counterprotected io.dropwizard.metrics5.MetricRegistryprotected static final Stringprotected List<MetricsReporterDescriptor>protected List<MetricsReporter>Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.voiddeactivate(ComponentContext context) Deactivates the component.protected voidinstrumentJvm(boolean activate) protected voidinstrumentLog4j(boolean activate) protected voidinstrumentTomcat(boolean activate) protected booleanprotected voidregisterTomcatGauge(String mbean, String attribute, io.dropwizard.metrics5.MetricRegistry registry, String name) voidstart(ComponentContext context) Start the component.voidvoidstop(ComponentContext context) Stop the component.voidprotected voidupdateInstrumentation(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, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein interfaceComponent- Overrides:
deactivatein classDefaultComponent- Parameters:
context- the runtime context
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent
-
metricEnabled
protected boolean metricEnabled() -
startReporters
public void startReporters()- Specified by:
startReportersin interfaceMetricsService
-
stopReporters
public void stopReporters()- Specified by:
stopReportersin 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)
-