12-12 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server
Example 12–3 Sample THROTTLE Configuration in the DyeInjection Monitor, in DIAG_
MODULE.xml
wldf-resource nameMyDiagnosticModulename
instrumentation wldf-instrumentation-monitor
nameDyeInjectionname properties
THROTTLE_INTERVAL=3000 THROTTLE_RATE=6
properties wldf-instrumentation-monitor
instrumentation -- Other elements to configure this diagnostic monitor --
wldf-resource
Example 12–4 shows the configuration for a JDBC_Before_Start_Internal delegating
monitor where the THROTTLE dye is set in the dye mask for the monitor.
Example 12–4 Sample Configuration for Setting THROTTLE in a Dye Mask of a
Delegating Monitor, in DIAG_MODULE.xml
wldf-resource nameMyDiagnosticModulename
instrumentation wldf-instrumentation-monitor
nameJDBC_Before_Start_Internalname enabledtrueenabled
dye-maskTHROTTLEdye-mask wldf-instrumentation-monitor
instrumentation -- Other elements to configure this diagnostic monitor --
wldf-resource
12.6.2 How Throttling is Handled by Delegating and Custom Monitors
Dye masks and dye filtering provide a mechanism for restricting which requests are passed to delegating and custom monitors for handling, based on properties of the
requests. The presence of a property in a request is indicated by the presence of a dye, as discussed in
Section 12.3, Configuring the Dye Vector via the DyeInjection Monitor.
One of those dyes can be the THROTTLE dye, so that you can filter on THROTTLE, just like any other dye.
The items in the following list explain how throttling is handled:
■
If dye filtering for a delegating or custom monitor is enabled and that monitor has a dye mask, filtering is performed based on the dye mask. That mask may include
the THROTTLE dye, but it does not have to. If THROTTLE is included in a dye mask, then THROTTLE must also be included in the requests dye vector for the
request to be passed to the monitor. However, if THROTTLE is not included in the dye mask, all qualifying requests are passed to the monitor, whether their dye
vectors include THROTTLE or not.
■
If dye filtering for a delegating or custom monitor is not enabled and neither THROTTLE property is set in the DyeInjection monitor, dye filtering will not take
place and throttling will not take place.
■
If dye filtering for a delegating or custom monitor is not enabled and THROTTLE is configured in the DyeInjection monitor, delegating monitors ignore dye masks
Configuring the DyeInjection Monitor to Manage Diagnostic Contexts 12-13
but do check for the presence of the THROTTLE dye in all requests. Only those requests dyed with THROTTLE are passed to the delegating monitors for
handling. Therefore, by setting a THROTTLE_RATE andor THROTTLE_ INTERVAL in the DyeInjection monitor, you reduce the number of requests
handled by all delegating monitors. You do not have to configure dye masks for all your delegating monitors to take advantage of throttling.
■
If dye filtering for a delegating or custom monitor is enabled and the only dye set in a dye mask is THROTTLE, only those requests that are dyed with THROTTLE
are passed to the delegating monitor. This behavior is the same as when dye filtering is not enabled and THROTTLE is configured in the DyeInjection monitor.
12.7 Using weblogic.diagnostics.context