Administration Console Online Help

    Previous Next  Open TOC in new window 
Content starts here

Create Custom Diagnostic Monitors for Applications

Before you begin

You add diagnostic monitors (including custom monitors) to a diagnostic applicaton module that is deployed to an application or application module. Create and configure the diagnostic applciation module, as described in Configure instrumentation for applications. (For more information about custom monitors, see "Configuring Application-Scoped Instrumentation" in Configuring and Using the WebLogic Diagnostics Framework.)

To create a diagnostic application module:

  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
  2. In the left pane, click Deployments.
  3. On the Summary of Deployments > Control page, click the name of the application or application module for which you want to configure diagnostic monitors.
  4. On the Setting for [Application or Module name] page, select Configuration > Instrumentation.
  5. Under Diagnostic Monitors in this Module, click Add Custom Monitor.
  6. On the Add Custom Monitor page, enter a name for the monitor in the Monitor Name field.
  7. In the Description field, enter an optional description.
  8. Select a location from the Location Type field. The location type determines where the diagnostic action is triggered relative to a joinpoint, which is a specific location in a class, for example a method or a call site within a method.
    • Select Before to specify that the diagnostic activity will occur before the joinpoint.
    • Select After to specify that the diagnostic activity will occur after the joinpoint.
    • Select Around to specify that the diagnostic activity will occur both before and after the joinpoint.
  9. In the Pointcut field, enter 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>] ?
    <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.
  10. Click OK.
  11. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
    Not all changes take effect immediately—some require a restart (see Use the Change Center).

  Back to Top