Configuring the THROTTLE Dye

Configuring the DyeInjection Monitor to Manage Diagnostic Contexts 12-11

12.6.1 Configuring the THROTTLE Dye

Unlike other dyes in the dye vector, the THROTTLE dye is configured through two properties. ■ THROTTLE_INTERVAL sets an interval in milliseconds after which a new incoming request is dyed with the THROTTLE dye. If the THROTTLE_INTERVAL is greater than 0, the DyeInjection monitor sets the THROTTLE dye flag in the dye vector of an incoming request if the last request dyed with THROTTLE arrived at least THROTTLE_INTERVAL before the new request. For example, if THROTTLE_INTERVAL=3000, the DyeInjection monitor waits at least 3000 milliseconds before it will dye an incoming request with THROTTLE. ■ THROTTLE_RATE sets the rate in terms of the number of incoming requests by which new incoming requests are dyed with the THROTTLE dye. If THROTTLE_RATE is greater than 0, the DyeInjection monitor sets the THROTTLE dye flag in the dye vector of an incoming request when the number of requests since the last request dyed with THROTTLE equals THROTTLE_RATE. For example, if THROTTLE_RATE = 6, every sixth request is dyed with THROTTLE. You can use THROTTLE_INTERVAL and THROTTLE_RATE together. If either condition is satisfied, the request is dyed with the THROTTLE dye. If you assign a value to either THROTTLE_INTERVAL or THROTTLE_RATE or both, or neither, you are configuring the THROTTLE dye. A THROTTLE configuration setting in the Administration Console is shown in the following figure. Figure 12–4 Configuring the THROTTLE Dye Example 12–3 shows the resulting configuration in the descriptor file for the diagnostics module. Note: The USERn and ADDRn dyes allow inspection of requests from specific users or IP addresses. However, they do not provide a means to look at arbitrary user transactions. The THROTTLE dye provides that functionality by allowing sampling of requests. 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