Interface MetricsRecorderService
- All Known Implementing Classes:
MetricsRecorderServiceImpl
public interface MetricsRecorderService
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstartRecording(ActivityType activityType, Supplier<String> name, Supplier<String> details, Supplier<CategoryData> categoryData) Start collecting metrics for the current thread.startRecording(ActivityType activityType, Supplier<String> name, Supplier<String> details, Supplier<CategoryData> categoryData, @Nullable String requestOrigin) voidupdateCategoryOfActiveRecording(Supplier<CategoryData> categoryData) Change theCategoryDataof the currently active recordingvoidupdateExceptionOfActiveRecording(Exception exception) Update the exception of the currently active recording
-
Method Details
-
startRecording
MetricsData startRecording(ActivityType activityType, Supplier<String> name, Supplier<String> details, Supplier<CategoryData> categoryData) Start collecting metrics for the current thread.MetricsData.close()must be called to stop the recording. -
startRecording
MetricsData startRecording(ActivityType activityType, Supplier<String> name, Supplier<String> details, Supplier<CategoryData> categoryData, @Nullable @Nullable String requestOrigin) -
recordingInProgress
boolean recordingInProgress()- Returns:
- true if metrics are already being collected for the current thread
-
updateCategoryOfActiveRecording
Change theCategoryDataof the currently active recording -
updateExceptionOfActiveRecording
Update the exception of the currently active recording
-