Creating Dynamic Concrete Aspects

This section describes how to instrument classes and methods that are not covered by plugins. You create dynamic concrete aspects by editing the insight/collection-plugins/custom-aop/META-INF/aop.xml file.

<?xml version="1.0" encoding="UTF-8"?>
       <concrete-aspect name="" extends="com.springsource.insight.collection.method.custom.CustomConcretizedOperationCollectionAspect">
           <pointcut name="collectionPoint" expression="execution(*" />

The following examples illustrate different definitions of the expression and the effect achieved by each.

Example 1

Monitor all public methods from any class that is annotated with @MyClassAnnotation:

execution(* ( *).*(..))

Example 2

Monitor all public methods from any class ending in Impl that resides in the package or any of its sub-packages:


Example 3

Monitor all public methods that are annotated with @MyMethodAnnotation from any class:

execution( * *(..))

Example 4

Monitor all public login methods that accept two String parameters and that are implemented by MyClass or any class that extends it: