Skip to content

Monitoring Framework - Monitor names to stem from the implementing classes, rather than their interfaces [SPR-4275] #8953

@spring-projects-issues

Description

@spring-projects-issues

Andreas Schildbach opened SPR-4275 and commented

Consider the following example. I'm applying a profiling aspect to my annotated services like this:

aop:config
<aop:advisor advice-ref="serviceInterceptor" pointcut-ref="services" />
</aop:config>

<bean id="serviceInterceptor" class="org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor">
<property name="trackAllInvocations" value="true" />
</bean>
<bean id="services" class="org.springframework.aop.support.annotation. AnnotationMatchingPointcut">
<constructor-arg value="org.springframework.stereotype.Service" />
</bean>

Problem is, the names of the Jamon Monitors (as per AbstractTraceInterceptor.createInvocationTraceName ()) stem from the names of the interfaces (or abstract classes), not from the actual implementation classes. This is particularly annoying for interface methods that are inherited from a 'common' interface: Those only get one monitor for all implementations together - there is no way to distinguish.

My proposal is to find a way (via Spring configuration) so that the monitor names always stem from the implementing classes.


Affects: 2.5 final

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions