BTM Profiler Settings

eG Enterprise is capable of monitoring the performance of business transactions to mission-critical web applications. The solution provides proprietary BTM (Business Transaction Monitoring) Profilers for popular application languages / frameworks such as Java, .NET, .NET Core, PHP, and Node.js. These profilers measure transaction responsiveness, trace the path of each transaction to discover the nodes it visits during its lifetime, and also reports the time spent by that transaction at each node. With the help of the deep dive analytics reported by the BTM profiler and the intuitive and incisive visuals offered by the eG manager (e.g., cross-application transaction flow), administrators can quickly and accurately diagnose the root-cause of transaction slowness.

The procedure for instrumenting and setting up the BTM profiler varies based on the underlying application technology. Naturally, where eG Enterprise monitors numerous web applications built on heterogeneous application frameworks, administrators may find it difficult to manage the settings and configuration of each profiler manually. To ease the pain of administrators, eG Enterprise provides a single, unified interface using which administrators can efficiently manage all the eG BTM profilers employed in the target environment.

Note:

Presently, this interface provides support to Java and Node.js applications alone.

To access and operate this interface, do the following:

  1. Login to the eG administrative interface.

  2. In the Admin tile menu, follow the menu sequence, Agents -> BTM Profiler Settings.

  3. Figure 1 will then appear, displaying the components (Java and Node.js) for which BTM has been / should be enabled.

    BTM Profiler Settings Page

    Figure 1 : List of components for which BTM has been / can be enabled

  4. If you want to view the details of a specific BTM component type alone - i.e., either Java BTM or Node.js BTM - then pick the type you need from the drop-down at the left top corner of Figure 1. The page will then display only the details that match your choice.

  5. Clicking on the Show GUIDs button in Figure 1 will list the GUIDs that eG Enterprise auto-generates and assigns to each BTM component (see Figure 2).

    Viewing BTM Component GUIDs

    Figure 2 : Viewing the GUIDs of the BTM components

  6. This GUID is unique for each BTM component, and helps the eG BTM profiler distinctly identify each of its targets. Since the GUID is not based on the IP address/host name, nick name, or port number of the BTM component, it remains constant even if any of the other details change for the target. This is most useful in elastic environments, where resources are provisioned and deprovisioned dynamically. In such environments, the GUID ensures that the profiler performs transaction tracing for the target BTM app even if the hostname/nick name/port number of the component changes.

  7. Click on the Modify icon against a listing here to specify/modify which Application and Tier the managed BTM-enabled component belongs to (see Figure 3).

    Configuring Application and Tier Name

    Figure 3 : Configuring the Application and Tier of the managed BTM-enaled component

  8. Against Application Name, specify the name of the web application/service that is delivered by the target Java/Node.js component. For example, if the Tomcat server being managed runs the business logic that supports the operations of an online store, then you can configure the name of this e-store as the Application Name. Next, specify the Tier Name to which the managed component belongs. In the APM context, a 'tier' groups similar service instances for monitoring purposes. For instance, if multiple Tomcat servers work together to perform a specific function - say, driving the payment gateway engine - then, these Tomcat servers can be logically grouped into a 'tier' named 'Payment'. The application and tier specifications together help the eG manager map dependencies, thus lending clarity, context, and accuracy to the cross-application transaction flows that the eG manager auto-constructs.

  9. Whenever eG Enterprise auto-discovers a Java/Node.js component, it links that component to a default application. Naturally, if Figure 3 is used to override the default application name for any one of the auto-discovered Java/Node.js components, the Application Name of the other Java/Node.js components gets automatically updated. This is why, the Update inter-linked components appname flag is set to Yes by default. If you do not want the appname of the linked components to be updated with the changes made using Figure 3, then set this flag to No. This is ideal if the Java/Node.js components in your environment are engaged in delivering different web applications/services.

  10. Then, click the Update button.

  11. To instrument a Java component that is monitored in an agent-based manner for Business Transaction Monitoring, first click on the icon corresponding to that component in Figure 1. Figure 4 will then appear.

    Copying Java Options

    Figure 4 : Copying JVM Options

  12. The JVM Option displayed in Figure 4 should be copied to the start-up script of the JVM node/instance, in order to BTM-enable that node. For more details, refer to Installing eG Java BTM on a Generic JVM Node in the Java Business Transaction Monitoring document.

  13. On the other hand, if you want to instrument a Node.js component that is monitored in an agent-based manner for business transaction monitoring, then, click on the icon corresponding to that component in Figure 1. Figure 5 will then appear.

    Copying Application Code Snippet into Node.js Application

    Figure 5 : Copying Node.js Options

  14. By default, you can BTM-enable the Node.js application using the following methods:

    • By adding the snippet available in the Application Code tab of Figure 5 to the start up script file of the target Node.js application.

    • By adding the snippet available in the PM2 Script tab of Figure 6 to the ecosystem.config.js file of the target Node.js application. Note that you can use this method only when the target Node.js application is deployed using PM2.

      Copying PM2 Script

      Figure 6 : Instrumenting Node.js using PM2 script

    • By adding the snippet available in the Start-up Arg tab of Figure 7 to the start up arguments while the target Node.js application is started using command prompt.

      Copying Start-up Arg

      Figure 7 : Instrumenting Node.js using Start-up arg

  15. To know more about using each of the options described in step 14 above, refer to Installing eG Node.js BTM on a Node.js Application in the Monitoring Node.js document.

  16. The eG APM Profiler is available as a file named eg_btm.jar on the eG agent host. A key pre-requisite for business transaction monitoring is that this jar file should be made available on the system hosting the target Java/Node.js application prior to instrumenting that application. Where the target application is monitored in an agent-based manner, this pre-requisite is automatically fulfilled, as the file and the target application already co-exist. On the other hand, if the application is monitored in an agentless manner, the profiler and the target application will run on different hosts. In this case, you first have to make the eg_btm.jar available on the system hosting the target application, and then proceed to instrument the application. For this purpose, you first need to access the eG management console from the system hosting the target application, navigate to Figure 2, and then click on the Download icon against the target component in Figure 2. This will download profiler related files in a zipped format to the target application host. The procedure for extracting the contents of the zip and using the jar file within to BTM-enable the target application will differ based on the application server where the application runs - i.e., whether it is an Apache Tomcat Server, Node.js, WebLogic application server etc. So, to know the correct procedure, refer to the Java application server-specific topics in the Java Business Transaction Monitoring document, or Installing eG Node.js BTM on a Node.js Application in the Monitoring Node.js document, as the case may be.

  17. To configure advanced monitoring settings/preferences for the profiler, click on the Settings icon corresponding to the server in Figure 2. This will invoke Figure 8.

    Injecting RUM Script via eG BTM

    Figure 8 : Injecting RUM script via eG BTM

  18. The left panel of Figure 8 consists of a tree-structure, where each node represents an advanced monitoring attribute that you can configure for the profiler. By default, the RUM Injection via BTM option is chosen. The right panel will display relevant options.

  19. eG RUM can be instrumented using a wide range of methodologies - from adding a RUM script to a common header page to container-assisted RUM injections. Where such options cannot be employed, administrators should manually insert the RUM script into every page. If there are hundreds of pages to be RUM-enabled, then manually inserting the RUM script in each page involves a lot of time and effort. To save administrators the time and trouble involved in manual script insertion, eG Enterprise leverages the built-in transaction tracing capability of the eG Java  Business Transaction Monitor (BTM) to automatically RUM-enable web pages. To configure this capability, do the following using the right panel of Figure 8:

    • Set the Enable RUM Injection flag to Yes.

    • Next, from the Real user monitor component drop-down, select the RUM component into which the RUM script has to be injected.

    • The RUM script can be auto-injected into only those pages with content-type HTML. Accordingly, the RUM code snippet field is set to HTML by default.

    • Finally, save the configuration by clicking the Save button in Figure 8. If you want to clear the settings, then click the Reset button.

  20. If you click on the Integration Cookie node in the tree-structure in the let panel of Figure 8, the right panel will change as displayed by Figure 9 below.

    Enabling RUM-BTM Integration

    Figure 9 : Enabling RUM-BTM integration

  21. To enable RUM-BTM integration, set the Enable RUM BTM Integration Cookie flag in the right panel of Figure 9 to Yes and click the Save button therein. This integration is most useful when you have BTM-enabled the backend application server of a RUM-enabled web application. In such a scenario, integrating RUM and BTM will add robust drill-down capabilities to your RUM dashboard view. With the help of these capabilities, you can quickly and accurately identify what problem in the server-side (whether its an erroneous line of code, an inefficient query, a slow API call etc.) is causing the page loading slowness that is seen in the browser-side.

    This is what happens once you turn on the Enable RUM BTM Integration Cookie flag:

    • eG RUM assigns a unique identifier to every page view request it receives from the user for the target web application, via the web browser.

    • When such a page view request reaches the eG BTM-enabled backend application server for processing, eG BTM assigns another identifier to that request on the backend system.

    • Once the application server successfully processes the page view request, it will return a response to the browser.

    • The unique ID that eG BTM assigns to the request is communicated to the browser along with this response. This ID will be included in the response header (EGRUM_BTM) in case of AJAX requests, and a cookie (EGRUM_BTM) in the case of base and iFrame requests.

    • eG RUM retrieves this ID from the browser and then maps this ID to the eG RUM page view ID. This way, eG RUM links a page view request with two IDs - an eG RUM-assigned ID and an eG BTM-assigned ID. This mapping is stored and maintained in the eG database.

    • When you zoom into a URL in the Detailed Diagnosis page, the RUM Transaction Details page opens, where the transaction flow and the load time metrics that eG RUM captures are graphically represented. At this juncture, the eG manager checks the eG database for IDs that are mapped to the URL in question.

    • If the eG manager finds that the URL is mapped to an eG BTM ID as well, it instantly figures out that server-side performance insights are also available for the target URL.

    • In such a case, administrators can instantly drill-down from the Server Response Time representation in the RUM Dashboard to view the complete cross-application flow of the transaction that eG BTM helps generate.

    Note:

    As indicated above, eG BTM employs cookie and response header to communicate the server-side transaction ID to eG RUM. Typically, if the monitored web site/application is SSL-enabled, then a 'secure' cookie is dropped. However, note that regardless of whether/not the target application is secure, eG BTM does not turn on the HttpOnly flag of the EGRUM_BTM cookie. This is done only to enable eG RUM to read the server-side ID from the cookie. Note that this setting will not compromise the functionality, performance, or security of the target web site/application.

  22. Next, click on the Exception and Error node in the tree-structure in the left panel of Figure 8. The right panel will then change to display the options shown by Figure 10.

    Enabling Error Cause Capture

    Figure 10 : Enabling the capture of the cause of an exception

  23. By default, when reporting detailed metrics pertaining to error transactions, eG Enterprise does not capture the cause of the error/exception. This is why, the Capture cause of exception flag is set to No by default. Knowing what caused an error/exception can greatly aid the troubleshooting efforts of IT help desk. This is why, some IT administrators may want the cause captured and reported as part of detailed diagnostics. Such administrators can turn on the Capture cause of exception flag. Note that setting this flag to Yes can increase the strain on the eG database, particularly where error-prone applications are monitored. So, you are advised to turn on this flag, only if your eG database is well-sized and well-tuned.

  24. Once cause capture is enabled, you can proceed to configure the 'depth' of the capture. By default, the first 15 lines of the cause specification is alone captured and reported as part of detailed metrics. If you want detailed diagnosis to provide more granular information related to the error cause, then you can increase the Max exception cause depth. Before increasing, make sure that your eG database is sized enough to handle the additional data load that this may generate. Decrease the Max exception cause depth if you believe that you can accurately diagnose what caused the error using fewer lines (less than 15 lines) of the cause definition.

  25. By default, the profiler counts all transactions that return HTTP status response codes between 400 and 505 as Error transactions. Accordingly, the Error status code range is set to 400-505 by default. You can change this range, so you can capture only those errors that matter to you. For instance, if you want to widen the net so you can capture more HTTP errors, then you can increase this range by specifying, 300-505.

  26. Finally, click the Save button in Figure 10 to save the changes.

  27. Then, click the SQL and JDBC node in the left panel of Figure 8. The right panel will then change to display the options shown by Figure 11.

    Configuring Max SQL Call Count to Capture

    Figure 11 : Configuring Max sql call count limit

  28. Typically, from the detailed diagnosis of a slow/stalled/error transaction of a Java/Node.js server, you can drill down to view the SQL queries (if any) executed by that transaction from that server and the execution time of each query. By default, eG picks the first 50 SQL queries executed by the transaction, compares the execution time of each query with the SQL Execution Cutoff configured at the test level, and displays only those queries with an execution time that is higher than the configured cutoff. This is why, the Max sql call count limit parameter is set to 50 by default.

    To improve agent performance, you may want the SQL Execution Cutoff to be compared with the execution time of a less number of queries – say, 20 queries. Similarly, to increase the probability of capturing more number of long-running queries, you may want the SQL execution cutoff to be compared with the execution time of a large number of queries – say, 1000 queries. For this, you just need to modify the Max sql call count limit specification to suit your purpose.

  29. Finally, click the Save button in Figure 11 to save the changes.

  30. Next, click the Miscellaneous node in the left panel of Figure 8. The right panel will then change as displayed by Figure 12.

    Configuring Remote Header Address for Client IP Capture

    Figure 12 : Configuring the remote header address

  31. Detailed metrics reported by eG Enterprise for problematic transactions typically includes the IP address of the client device from which each transaction originated. If transactions emerging from the same client device frequently fail/slow down, then detailed diagnostics will shed light on that anomaly, enabling administrators to view the client device and its configuration suspiciously.

    By default, eG Enterprise reads the client IP address from the X-Forwarded-For header of the HTTP transaction request. This is why, the Remote header address parameter is set to X-Forwarded-For by default. In some environments however, an alternative header may be used to capture the client IP address. For instance, in environments where load balancers and proxy software are used to route HTTP requests, X-Client-IP header is often used to capture client IP. In such environments, administrators can configure X-Client-IP as the Remote header address.

  32. Finally, click the Save button in Figure 12 to save the changes.