Package com.atlassian.jira.servermetrics
Interface ServerMetricsDetailCollector
- All Known Implementing Classes:
MultiThreadedRequestMetricsCollector,NoopServerMetricsDetailCollector
@ThreadSafe
@PublicApi
@ExperimentalApi
@ParametersAreNonnullByDefault
public interface ServerMetricsDetailCollector
Allows services/manager to insert details about request processing time into
JIRA server metrics.
Implementations automatically obtain information about current request from current thread.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTimeSpentInActivity(String activityName, Duration duration) Adds time spent in given activityvoidcheckpointReached(String checkpointName) Insert information that some named point in request processing was reached.
For server metrics purposes request will be divided into several named blocks and time spent in each block will be logged.voidcheckpointReachedOnce(String checkpointName) This is special case ofcheckpointReached(String)- add information about checkpoint being reached only if checkpoint with given name was not visited before.voidcheckpointReachedOverride(String checkpointName) This is special case ofcheckpointReached(String)- override previous information about checkpoint with current information.
-
Method Details
-
checkpointReached
Insert information that some named point in request processing was reached.
For server metrics purposes request will be divided into several named blocks and time spent in each block will be logged.- Parameters:
checkpointName- name of checkpoint - should be whitelisted in jira analytics whitelist:jira-components/jira-plugins/jira-analytics-whitelist-plugin/src/main/resources/jira-analytics-whitelist-plugin-whitelist.jsoneventjira.http.request.stats
-
checkpointReachedOnce
This is special case ofcheckpointReached(String)- add information about checkpoint being reached only if checkpoint with given name was not visited before. -
checkpointReachedOverride
This is special case ofcheckpointReached(String)- override previous information about checkpoint with current information. -
addTimeSpentInActivity
Adds time spent in given activity- Parameters:
activityName- activity name i.e.: databaseRead, cacheLoad, etc... - should be whitelisted in jira analytics whitelist:jira-components/jira-plugins/jira-analytics-whitelist-plugin/src/main/resources/jira-analytics-whitelist-plugin-whitelist.jsonduration- duration that will be added to current activity time
-