Class MetricsServicePointListener
java.lang.Object
ch.tocco.nice2.metrics.impl.servlet.MetricsServicePointListener
- All Implemented Interfaces:
ServicePointListener
@Component
@ConditionalOnProperty(value="ch.tocco.nice2.enableUpgradeMode",
havingValue="false",
matchIfMissing=true)
public class MetricsServicePointListener
extends Object
implements 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterMethodInvocation(UUID invocationUuid, Method method, @Nullable Exception exception) Called after a 'remote service' method was executed (even when an exception was thrown).voidbeforeMethodInvocation(UUID invocationUuid, Method method, Object[] params) Called before a 'remote service' method is executed.voidsetCategoryExtractors(List<MetricsCategoryExtractor> categoryExtractors)
-
Constructor Details
-
MetricsServicePointListener
-
-
Method Details
-
setCategoryExtractors
-
beforeMethodInvocation
Description copied from interface:ServicePointListenerCalled before a 'remote service' method is executed.- Specified by:
beforeMethodInvocationin 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:ServicePointListenerCalled after a 'remote service' method was executed (even when an exception was thrown).- Specified by:
afterMethodInvocationin interfaceServicePointListener
-