Diagnostic Modules: Create a Custom Monitor
Configuration Options Related Tasks Related Topics
Use this page to create a custom diagnostic monitor.
Name Description Monitor Name
The name of the custom monitor.
A description for this custom monitor.
The location where the diagnostic action will be triggered, relative to a joinpoint. A joinpoint is a specific location in a class, for example a method or a call site within a method. Locations can be:
- Before specifies that the diagnostic activity will occur before the joinpoint.
- After specifies that the diagnostic activity will occur after the joinpoint.
- Around specifies that the diagnostic activity will occur both before and after the joinpoint.
An expression to define the pointcut. A pointcut is an expression that specifies a set of joinpoints. Use the following pointcut syntax.
You can specify two types of pointcuts for custom monitors:
- call: Take an action when a method is invoked.
- execution: Take an action when a method is executed.
The syntax for definining a pointcut expression is as follows:
<pointcut> ::= [(] <joinpoint> [ <conditional> <joinpoint> ] [)] <joinpoint> ::= [(] <execution-joinpoint> | <call-joinpoint> <execution-pointcut> ::= execution ( <access-type> <joinpoint-signature> ) <callsite-pointcut> ::= call ( <joinpoint-signature> ) <joinpoint-signature> ::= <method-signature> <method-signature> ::= <return-type> <class-type>.<method-name> ( <parameter-list> ) <return-type> ::= <class-type> | <primitive-type> <parameter-list> ::= <parameter-type> [, <parameter-type>] * <parameter-type> ::= <class-type> | <primitive-type> | <elepsis> <class-type> ::= [<use-class-heirarchy>] ? <class-or-interface-name-pattern> <conditional> ::= AND [NOT] | OR [NOT] | NOT <use-class-heirarchy> ::= '+' <elepsis> ::= '...'
The following rules apply:
- Wildcards (*) can be used in class types and method names.
- An ellipsis (...) in the argument list signifies a variable number of arguments of any types beyond the argument.
- A + (plus sign) prefix to a class type identifies all subclasses, subinterfaces or concrete classes implementing the specified class/interface pattern.
- A pointcut expression specifies a pattern to identify matching joinpoints. An attempt to match a joinpoint against it will return a boolean, indicating a valid match (or not).
- Pointcut expressions can be combined with AND, OR and NOT boolean operators to build complex pointcut expression trees.
- Configure instrumentation for applications
- Use diagnostic application modules to monitor applications