Class MetricsServicePointListener
java.lang.Object
ch.tocco.nice2.metrics.impl.servlet.MetricsServicePointListener
- All Implemented Interfaces:
ServicePointListener
ServicePointListener
that intercepts 'remote service' calls and
collects metrics.
Note: In case a 'remote service' calls another 'remote service' during its execution,
the second service call will not be logged separately (only the first call per thread is logged
and all nested calls are part of this log entry).-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterMethodInvocation
(UUID invocationUuid, Method method, @Nullable Exception exception) Called after a 'remote service' method was executed (even when an exception was thrown).void
beforeMethodInvocation
(UUID invocationUuid, Method method, Object[] params) Called before a 'remote service' method is executed.void
setCategoryExtractors
(List<MetricsCategoryExtractor> categoryExtractors)
-
Constructor Details
-
MetricsServicePointListener
-
-
Method Details
-
setCategoryExtractors
-
beforeMethodInvocation
Description copied from interface:ServicePointListener
Called before a 'remote service' method is executed.- Specified by:
beforeMethodInvocation
in interfaceServicePointListener
- Parameters:
invocationUuid
- a unique id that identifies this method call
-
afterMethodInvocation
public void afterMethodInvocation(UUID invocationUuid, Method method, @Nullable @Nullable Exception exception) Description copied from interface:ServicePointListener
Called after a 'remote service' method was executed (even when an exception was thrown).- Specified by:
afterMethodInvocation
in interfaceServicePointListener
-