Package ch.tocco.nice2.metrics.impl
Interface MetricsRecorderService
- All Known Implementing Classes:
MetricsRecorderServiceImpl
public interface MetricsRecorderService
-
Method Summary
Modifier and TypeMethodDescriptionboolean
startRecording
(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) void
updateCategoryOfActiveRecording
(Supplier<CategoryData> categoryData) Change theCategoryData
of the currently active recordingvoid
updateExceptionOfActiveRecording
(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 theCategoryData
of the currently active recording -
updateExceptionOfActiveRecording
Update the exception of the currently active recording
-