Configuring Server-Scoped Instrumentation Oracle Fusion Middleware Online Documentation Library

11-10 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server Thus, the dye filtering mechanism allows monitors to take diagnostic actions only for specific requests, without slowing down other requests. See Chapter 12, Configuring the DyeInjection Monitor to Manage Diagnostic Contexts, for detailed information on diagnostic contexts and dye vectors.

11.3.3 Mapping wldf-instrumentation-monitor XML Elements to Monitor Types

Table 11–4 summarizes which wldf-instrumentation-monitor elements apply to which monitors.

11.4 Configuring Server-Scoped Instrumentation

To enable instrumentation at the server level, and to configure server-scoped monitors, perform the following steps: 1. Decide how many WLDF system resources you want to create. You can have multiple DIAG_MODULE.xml diagnostic descriptor files in a domain, but for each server or cluster you can deploy only one diagnostic descriptor file at a time. One reason for creating more than one file is to give yourself flexibility. You could have, for example, five diagnostic descriptor files in the DOMAIN_NAMEconfigdiagnostics directory. Each file contains a different instrumentation and perhaps Harvester and Watch and Notification configuration. You then deploy a file to a server based on which monitors you want active for specific situations. 2. Decide which server-scoped monitors you want to include in a configuration: ■ If you plan to use dye filtering on a server, or on any applications deployed on that server, configure the DyeInjection monitor. ■ If you plan to use one or more of the server-scoped delegating monitors, decide which monitors to use and which actions to associate with each monitor. 3. Create and configure the configuration files. ■ If you use the Administration Console to create the DIAG_MODULE.xml file recommended, for delegating monitors, the console displays only actions that are compatible with the monitor. If you create a configuration file with an Table 11–4 Mapping Instrumentation XML Elements to Monitor Types Element Standard Delegating Custom wldf-instrumentation-monitor X X X name X X X description X X X enabled X X X action X X dye-filtering-enabled X X dye-mask X X properties X 1 1 Currently used only by the DyeInjection monitor to set name=value pairs for dye flags. location-type X pointcut X Configuring Instrumentation 11-11 editor or with the WebLogic Scripting Tool WLST, you must correctly match actions to monitors. ■ See the Domain Configuration Files in Understanding Domain Configuration for Oracle WebLogic Server for information about configuring config.xml. 4. Validate and deploy the descriptor file. For server-scoped instrumentation, you can add and remove monitors and enable or disable monitors while the server is running. Example 11–1 contains a sample server-scoped instrumentation configuration file which enables instrumentation, and configures the DyeInjection standard monitor and the Connector_Before_Work delegating monitor. A single instrumentation element contains all instrumentation configuration for the module. Each diagnostic monitor is defined in a separate wldf-instrumentation-monitor element. Example 11–1 Sample Server-Scoped Instrumentation in DIAG_MODULE.xml wldf-resource xmlns=http:xmlns.oracle.comweblogicweblogic-diagnostics xmlns:xsi=http:www.w3.org2001XMLSchema-instance xsi:schemaLocation=http:xmlns.oracle.comweblogicweblogic-diagnostics1.0webl ogic-diagnostics.xsd instrumentation enabledtrueenabled wldf-instrumentation-monitor nameDyeInjectionname descriptionInject USER1 and ADDR1 dyesdescription enabledtrueenabled propertiesUSER1=weblogic ADDR1=127.0.0.1properties wldf-instrumentation-monitor wldf-instrumentation-monitor nameConnector_Before_Workname enabledtrueenabled actionTraceActionaction dye-filtering-enabledtruedye-filtering-enabled dye-maskUSER1dye-mask wldf-instrumentation-monitor instrumentation wldf-resource

11.5 Configuring Application-Scoped Instrumentation