Class AtlassianInstrumentationConfluenceMonitoring
java.lang.Object
com.atlassian.confluence.util.profiling.AtlassianInstrumentationConfluenceMonitoring
- All Implemented Interfaces:
ConfluenceMonitoring,ConfluenceMonitoringControl
@Internal
@ParametersAreNonnullByDefault
public class AtlassianInstrumentationConfluenceMonitoring
extends Object
implements ConfluenceMonitoring, ConfluenceMonitoringControl
An implementation of the Confluence Monitoring interfaces that's based upon the Atlassian Instrumentation library.
- Since:
- 5.7
-
Constructor Summary
ConstructorsConstructorDescriptionAtlassianInstrumentationConfluenceMonitoring(ControllableInstrumentRegistry instrumentRegistry, MutableRegistryConfiguration registryConfiguration, io.micrometer.core.instrument.MeterRegistry micrometerRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the currently held statistics.voidvoidDisable capturing CPU timing.voidDisable Hibernate monitoring.voidDisable monitoring.voidEnable capturing CPU timing.voidEnables Hibernate monitoring.voidEnables monitoring.@NonNull CounterfetchCounter(String name, String... optional) Fetches the counter associated with the supplied name details.@NonNull CounterfetchCounter(String name, Map<String, String> tags) Fetches the counter associated with the supplied name details.booleanboolean@NonNull List<CounterSnapshot> Returns a snapshot of the counters.@NonNull List<TimerSnapshot> Returns a snapshot of the timers.@NonNull SplitstartSplit(String name, String... optional) Creates and starts a split timer associated with the supplied name details.@NonNull SplitstartSplit(String name, Map<String, String> tags) Creates and starts a split timer associated with the supplied name details.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.util.profiling.ConfluenceMonitoring
createName, fetchCounter, startSplit
-
Constructor Details
-
AtlassianInstrumentationConfluenceMonitoring
public AtlassianInstrumentationConfluenceMonitoring(ControllableInstrumentRegistry instrumentRegistry, MutableRegistryConfiguration registryConfiguration, io.micrometer.core.instrument.MeterRegistry micrometerRegistry)
-
-
Method Details
-
disableAllMonitoring
- Throws:
Exception
-
fetchCounter
Description copied from interface:ConfluenceMonitoringFetches the counter associated with the supplied name details. The name is constructed callingConfluenceMonitoring.createName(String, String...).- Specified by:
fetchCounterin interfaceConfluenceMonitoring- Parameters:
name- the mandatory suggested nameoptional- the optional parts to concatenate with themandatorysuggestion- Returns:
- the counter associated with the name.
-
fetchCounter
Description copied from interface:ConfluenceMonitoringFetches the counter associated with the supplied name details.- Specified by:
fetchCounterin interfaceConfluenceMonitoring- Parameters:
name- the mandatory suggested nametags- the name-value tags to apply- Returns:
- the counter associated with the name.
- Since:
- 7.1
-
startSplit
Description copied from interface:ConfluenceMonitoringCreates and starts a split timer associated with the supplied name details. The name is constructed callingConfluenceMonitoring.createName(String, String...).The typical usage is:
try (Split split = instance.startSplit("name")) { // code to execute }- Specified by:
startSplitin interfaceConfluenceMonitoring- Parameters:
name- the mandatory suggested nameoptional- the optional parts to concatenate with themandatorysuggestion- Returns:
- the running split timer
-
startSplit
Description copied from interface:ConfluenceMonitoringCreates and starts a split timer associated with the supplied name details.The typical usage is:
try (Split split = instance.startSplit("name", singletonMap("tagname", "tagvalue"))) { // code to execute }- Specified by:
startSplitin interfaceConfluenceMonitoring- Parameters:
name- the mandatory suggested nametags- the name-value tags to apply- Returns:
- the running split timer
- Since:
- 7.1
-
isMonitoringEnabled
public boolean isMonitoringEnabled()- Specified by:
isMonitoringEnabledin interfaceConfluenceMonitoringControl- Returns:
- whether monitoring is enabled.
-
enableMonitoring
public void enableMonitoring()Description copied from interface:ConfluenceMonitoringControlEnables monitoring. It does not effect whether CPU timing is enabled.- Specified by:
enableMonitoringin interfaceConfluenceMonitoringControl
-
disableMonitoring
public void disableMonitoring()Description copied from interface:ConfluenceMonitoringControlDisable monitoring. It does not effect whether CPU timing is enabled.- Specified by:
disableMonitoringin interfaceConfluenceMonitoringControl
-
isCpuTimingEnabled
public boolean isCpuTimingEnabled()- Specified by:
isCpuTimingEnabledin interfaceConfluenceMonitoringControl- Returns:
- whether CPU timing is enabled.
-
enableCpuTiming
public void enableCpuTiming()Description copied from interface:ConfluenceMonitoringControlEnable capturing CPU timing. It does not effect whether monitoring is enabled.WARNING: turning on CPU timing will adversly impact on system performance. Do not do this on production systems without due consideration.
- Specified by:
enableCpuTimingin interfaceConfluenceMonitoringControl
-
disableCpuTiming
public void disableCpuTiming()Description copied from interface:ConfluenceMonitoringControlDisable capturing CPU timing. It does not effect whether monitoring is enabled.- Specified by:
disableCpuTimingin interfaceConfluenceMonitoringControl
-
enableHibernateMonitoring
public void enableHibernateMonitoring()Description copied from interface:ConfluenceMonitoringControlEnables Hibernate monitoring. It does not effect whether monitoring is enabled.- Specified by:
enableHibernateMonitoringin interfaceConfluenceMonitoringControl
-
disableHibernateMonitoring
public void disableHibernateMonitoring()Description copied from interface:ConfluenceMonitoringControlDisable Hibernate monitoring. It does not effect whether monitoring is enabled.- Specified by:
disableHibernateMonitoringin interfaceConfluenceMonitoringControl
-
clear
public void clear()Description copied from interface:ConfluenceMonitoringControlClears the currently held statistics.- Specified by:
clearin interfaceConfluenceMonitoringControl
-
snapshotCounters
Description copied from interface:ConfluenceMonitoringControlReturns a snapshot of the counters.- Specified by:
snapshotCountersin interfaceConfluenceMonitoringControl- Returns:
- a mutable list of the current counters.
-
snapshotTimers
Description copied from interface:ConfluenceMonitoringControlReturns a snapshot of the timers.- Specified by:
snapshotTimersin interfaceConfluenceMonitoringControl- Returns:
- a mutable list of the current timers.
-