Instrumentation Configuration Files Oracle Fusion Middleware Online Documentation Library

11-4 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server The WLDF diagnostics library provides the following actions, which you can attach to a monitor by including the actions name in an action element of the DIAG_ MODULE.xml configuration file: ■ DisplayArgumentsAction ■ StackDumpAction ■ ThreadDumpAction ■ TraceAction ■ TraceElapsedTimeAction ■ MethodInvocationStatisticsAction Actions must be correctly matched with monitors. For example, the TraceElapsedTime action is compatible with a delegating or custom monitor whose diagnostic location type is around. See Appendix B, WLDF Instrumentation Library, for more information.

11.2 Instrumentation Configuration Files

Instrumentation is configured as part of a diagnostics descriptor, an XML configuration file, whose name and location depend on whether you are implementing system-level server-scoped or application-level application-scoped instrumentation: ■ System-level instrumentation configuration is stored in diagnostics descriptors in the following directory: DOMAIN_NAMEconfigdiagnostics This directory can contain multiple system-level diagnostic descriptor files. Filenames are arbitrary but must be terminated with.xml myDiag.xml is a valid filename. Each file can contain configuration information for one or more of the deployable diagnostic components: Harvester, Instrumentation, or Watch and Notification. An instrumentation section in a descriptor file can configure one or more diagnostic monitors. Server-scoped instrumentation can be enabled, disabled, and reconfigured without restarting the server. Only one WLDF system resource and hence one system-level diagnostics descriptor file can be active at a time for a server or cluster. The active descriptor is linked and targeted from the following configuration file: DOMAIN_NAMEconfigconfig.xml For more information about configuring diagnostic system modules, see Section 4.6, Configuring Diagnostic System Modules. For general information about the creation, content, and parsing of configuration files in WebLogic Server, see Understanding Domain Configuration for Oracle WebLogic Server. ■ Application-level instrumentation configuration is packaged within an applications archive in the following location: META-INFweblogic-diagnostics.xml Because instrumentation is the only diagnostics component that is deployable to applications, this descriptor can contain only instrumentation configuration information. Configuring Instrumentation 11-5 You can enable and disable diagnostic monitors without redeploying an application. However, you may have to redeploy the application after modifying other instrumentation features, for example defining pointcuts or adding or removing monitors. Whether you have to redeploy depends on how you configure the instrumentation and how you deploy the application. There are three options: – Define and change the instrumentation configuration for the application directly, without using a JSR-88 deployment plan – Configure and deploy the application using a deployment plan that has placeholders for instrumentation settings – Enable the hot-swap feature when starting the server, and deploy using a deployment plan that has placeholders for instrumentation settings For more information about these choices, see Section 14.2, Using Deployment Plans to Dynamically Control Instrumentation Configuration. For more information about deploying and modifying diagnostic application modules, see Chapter 14, Deploying WLDF Application Modules. The diagnostics XML schema is located at: http:xmlns.oracle.comweblogicweblogic-diagnostics1.0weblog ic-diagnostics.xsd Each diagnostics descriptor file must begin with the following lines: wldf-resource xmlns=http:xmlns.oracle.comweblogicweblogic-diagnostics xmlns:xsi=http:www.w3.org2001XMLSchema-instance For an overview of WLDF resource configuration, see Chapter 4, Understanding WLDF Configuration.

11.3 XML Elements Used for Instrumentation