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 TypeMethodDescriptionvoid
clear()
Clears the currently held statistics.void
void
Disable capturing CPU timing.void
Disable Hibernate monitoring.void
Disable monitoring.void
Enable capturing CPU timing.void
Enables Hibernate monitoring.void
Enables monitoring.@NonNull Counter
fetchCounter
(String name, String... optional) Fetches the counter associated with the supplied name details.@NonNull Counter
fetchCounter
(String name, Map<String, String> tags) Fetches the counter associated with the supplied name details.boolean
boolean
@NonNull List<CounterSnapshot>
Returns a snapshot of the counters.@NonNull List<TimerSnapshot>
Returns a snapshot of the timers.@NonNull Split
startSplit
(String name, String... optional) Creates and starts a split timer associated with the supplied name details.@NonNull Split
startSplit
(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, wait
Methods 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:ConfluenceMonitoring
Fetches the counter associated with the supplied name details. The name is constructed callingConfluenceMonitoring.createName(String, String...)
.- Specified by:
fetchCounter
in interfaceConfluenceMonitoring
- Parameters:
name
- the mandatory suggested nameoptional
- the optional parts to concatenate with themandatory
suggestion- Returns:
- the counter associated with the name.
-
fetchCounter
Description copied from interface:ConfluenceMonitoring
Fetches the counter associated with the supplied name details.- Specified by:
fetchCounter
in 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:ConfluenceMonitoring
Creates 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:
startSplit
in interfaceConfluenceMonitoring
- Parameters:
name
- the mandatory suggested nameoptional
- the optional parts to concatenate with themandatory
suggestion- Returns:
- the running split timer
-
startSplit
Description copied from interface:ConfluenceMonitoring
Creates 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:
startSplit
in 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:
isMonitoringEnabled
in interfaceConfluenceMonitoringControl
- Returns:
- whether monitoring is enabled.
-
enableMonitoring
public void enableMonitoring()Description copied from interface:ConfluenceMonitoringControl
Enables monitoring. It does not effect whether CPU timing is enabled.- Specified by:
enableMonitoring
in interfaceConfluenceMonitoringControl
-
disableMonitoring
public void disableMonitoring()Description copied from interface:ConfluenceMonitoringControl
Disable monitoring. It does not effect whether CPU timing is enabled.- Specified by:
disableMonitoring
in interfaceConfluenceMonitoringControl
-
isCpuTimingEnabled
public boolean isCpuTimingEnabled()- Specified by:
isCpuTimingEnabled
in interfaceConfluenceMonitoringControl
- Returns:
- whether CPU timing is enabled.
-
enableCpuTiming
public void enableCpuTiming()Description copied from interface:ConfluenceMonitoringControl
Enable 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:
enableCpuTiming
in interfaceConfluenceMonitoringControl
-
disableCpuTiming
public void disableCpuTiming()Description copied from interface:ConfluenceMonitoringControl
Disable capturing CPU timing. It does not effect whether monitoring is enabled.- Specified by:
disableCpuTiming
in interfaceConfluenceMonitoringControl
-
enableHibernateMonitoring
public void enableHibernateMonitoring()Description copied from interface:ConfluenceMonitoringControl
Enables Hibernate monitoring. It does not effect whether monitoring is enabled.- Specified by:
enableHibernateMonitoring
in interfaceConfluenceMonitoringControl
-
disableHibernateMonitoring
public void disableHibernateMonitoring()Description copied from interface:ConfluenceMonitoringControl
Disable Hibernate monitoring. It does not effect whether monitoring is enabled.- Specified by:
disableHibernateMonitoring
in interfaceConfluenceMonitoringControl
-
clear
public void clear()Description copied from interface:ConfluenceMonitoringControl
Clears the currently held statistics.- Specified by:
clear
in interfaceConfluenceMonitoringControl
-
snapshotCounters
Description copied from interface:ConfluenceMonitoringControl
Returns a snapshot of the counters.- Specified by:
snapshotCounters
in interfaceConfluenceMonitoringControl
- Returns:
- a mutable list of the current counters.
-
snapshotTimers
Description copied from interface:ConfluenceMonitoringControl
Returns a snapshot of the timers.- Specified by:
snapshotTimers
in interfaceConfluenceMonitoringControl
- Returns:
- a mutable list of the current timers.
-