11-18 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
You can define a pointcut that covers the getValue method of the inner class Bar using the following specification:
execution public int FooBar getValue...; You can also use wildcards. For example:
execution FooBar get...; matches only the getter methods in the inner class Bar of class Foo.
You can also use leading and trailing wild cards: execution FooBa get...;
execution ooBar get...; execution ooBa get...;
also matches the getter methods in class FooBar.
11.6 Creating Request Performance Data
If you have configured server-scoped or application-scoped instrumentation, you can display request performance data in the WebLogic Server Administration Console.
The Request Performance page displays information about the real-time and historical views of method performance that has been captured by means of the WebLogic
Diagnostics Framework instrumentation capabilities.
To create request performance data, the following criteria must be met:
■
A WLDF system resource must be created and targeted to the server. Create the system resource as described in
Section 11.2, Instrumentation Configuration Files.
You can do this using the WebLogic Server Administration Console or the WebLogic Scripting Tool WLST.
■
Instrumentation in the targeted WLDF system resource must be enabled.
■
Application instrumentation must be enabled with a weblogic-diagnostics.xml descriptor, which you create in the application’s
META-INF directory, as described in Section 11.2, Instrumentation Configuration
Files.
■
Application instrumentation descriptors must use TraceElapsedTimeAction diagnostic actions attached to Around type diagnostic monitors. For example, a
descriptor could contain the following:
instrumentation enabledtrueenabled
wldf-instrumentation-monitor nameConnector_Around_Inboundname
actionTraceElapsedTimeActionaction wldf-instrumentation-monitor
instrumentation
Configuring Instrumentation 11-19
See Appendix B, WLDF Instrumentation Library,
for a list of “Around” type monitors.
For information about creating and analyzing request performance data in the WebLogic Server Administration Console, see Analyze request performance in the
Oracle WebLogic Server Administration Console Help.
Note: WebLogic Server does not require the
weblogic-diagnostics.xml descriptor to be pre-bundled in your application’s archive in order to make instrumentation changes to a
deployed application.
■
If your application uses a deployment plan, and you enable hot swap before deploying your application, you can make
instrumentation changes at run time without redeploying your application.
■
If your deployed application does not have a deployment plan and you modify the application’s instrumentation configuration,
the Administration Console automatically creates a deployment plan for you and prompts you for the location in which to save it.
■
If hot swap is not enabled in your deployment plan, or if you do not use a deployment plan, changes to some instrumentation
settings require redeployment.
For more information, see Chapter 14, Deploying WLDF Application
Modules.
11-20 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
12
Configuring the DyeInjection Monitor to Manage Diagnostic Contexts 12-1
12
Configuring the DyeInjection Monitor to Manage Diagnostic Contexts
The WLDF Instrumentation component provides a way to uniquely identify requests such as HTTP or RMI requests and track them as they flow through the system. You
can configure WLDF to check for certain characteristics such as the originating user or client address of every request that enters the system and attach a diagnostic context to
the request. This allows you to take measurements such as elapsed time of specific requests to get an idea of how all requests are being processed as they flow through
the system.
The diagnostic context consists of two pieces: a unique Context ID and a 64-bit dye vector that represents the characteristics of the request. The Context ID associated with
a given request is recorded in the Event Archive and can be used to:
■
Throttle instrumentation event generation, that is determine how often events are generated when specified conditions are met
■
Associate log records with a request
■
Filter searches of log or event records using the WLDF Accessor component see Chapter 13, Accessing Diagnostic Data With the Data Accessor
. The process of configuring and using a diagnostic context is described in the following
sections:
■
Section 12.1, Contents, Life Cycle, and Configuration of a Diagnostic Context