Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Update AnnotationDrivenBeanDefinitionParser.java #97

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rajuky
Copy link

@rajuky rajuky commented Nov 21, 2014

This would register all the customInterceptors defined in the following tag with the factory method "customInterceptorFactoryMethod" - a new method to be introduced into MetricsBeanPostProcessFactory.java
<!--metrics:annotation-driven metric-registry="myMetrics" >
<!--util:list id="customInterceptors" list-class="java.util.ArrayList" >
--com.myCustomMetrics.SystemExceptionMeteredInterceptor
--/util:list
--/metrics:annotation-driven

This would register all the customInterceptors defined in the following tag with the factory method "customInterceptorFactoryMethod" - a new method to be introduced into MetricsBeanPostProcessFactory.java
	<metrics:annotation-driven metric-registry="myMetrics" >
		<util:list id="customInterceptors" list-class="java.util.ArrayList" >
        	<value>com.myCustomMetrics.SystemExceptionMeteredInterceptor</value>
    	</util:list>
	</metrics:annotation-driven>
@ryantenney
Copy link
Owner

Could you provide a use case for this?

@rajuky
Copy link
Author

rajuky commented Dec 3, 2014

All the pull requests - 94,95,97,98 are related to one enhanced feature - To allow custom Interceptors to be integrated into metrics frame work with custom annotations.
Use Case:
We would like to capture metrics based on exception classification. 1.Client Exceptions (All validation errors, IllegalArgumentException) 2. Server Exceptions (SocketTimeOut, OutOfMemory, ) 3.BusinessServiceExceptions

We would like to capture metrics based on these 3 categories for all the services that we expose as web services. We would like to create our own Interceptors with custom annotations. Please let me know if you need further details. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants