IBM Support

IBM APM 8.1 - Response Time module javascript insertion for Transaction Monitoring

Product Documentation


Abstract

Provide more details about Response Time module and its javascript insertion for Transaction Monitoring

Content

1)

As documented here:

https://www.ibm.com/support/knowledgecenter/en/SSHLNR_8.1.4/com.ibm.pm.doc/install/wrt_functionality.htm

APM 8.1 product, with the HTTP server agent (product code HU) and with the Response time agent (product code T5), provides  Real End user Transaction Monitoring (Browser timings).

Browser based timings are made possible with JavaScript Injection in the monitored web pages.

2)

As documented here:

https://www.ibm.com/support/knowledgecenter/en/SSHLNR_8.1.4/com.ibm.pm.doc/install/wrt_config_agent_intro.htm#wrt_config_agent_intro

If you are using an IBM HTTP Server or an Apache HTTP server, use IBM HTTP Server Response Time module. The IBM HTTP Server Response Time module automatically does JavaScript Injection. The IBM HTTP Server Response Time module is a component of the HTTP Server agent. It is installed and configured as part of the HTTP Server agent.

Details about IBM HTTP Server Response Time module can be found here:

https://www.ibm.com/support/knowledgecenter/en/SSHLNR_8.1.4/com.ibm.pm.doc/install/wrt_module_description.htm#concept_bjx_ncg_cz

it's also known as : "wrt_module" ->  this is the IBM HTTP Server Response Time module

3)

As documented here:

https://www.ibm.com/support/knowledgecenter/en/SSHLNR_8.1.4/com.ibm.pm.doc/install/wrt_config_ihs.htm

"The IBM HTTP Server Response Time module is installed and configured as part of the HTTP Server agent. The IBM HTTP Server Response Time module only works in conjunction with IBM HTTP Server and Apache HTTP Server on AIX, Linux, and Windows. The IBM HTTP Server Response Time module monitors all ports for HTTP and HTTPS requests.

Using JavaScript, IBM HTTP Server Response Time module inserts a header into web pages that are served by an IBM HTTP Server so that the Response Time Monitoring agent can monitor those pages"

4)

That being said, if you are seeing issue with your web browser and its developer console, and do not see such javascript insertion occurring, here is the steps needed to collect extra data for further investigation....

Example of javascript insertion/injection:

access your monitored url : http(s)://<uri>, using for example Firefox browser.

then check, using Firefox browser with developer-mode GUI under the Network tab, with :

-disable cache option is enabled

and the network capture should show results like :

status 200, Method: GET wrt_perf_timing.js script is seen
status 200, Method: POST WrtTarget.dat xhr is seen

image-20191016165110-1

If that's NOT the case, then enable extra tracing, following these steps:

Edit the monitored HTTP web server configuration file  httpd.conf  (e.g. /opt/IBM/HTTPServer/conf/httpd.conf)

Add the 2 following lines in bold, after the  line that was added by/for HTTP server agent (hu), like for example :
include /opt/ibm/apm/agent/tmp/khu/khu.opt.IBM.HTTPServer.conf.httpd.conf

WrtDebugIPC
WrtEnableTraceLog


save httpd.conf file

restart the HTTP server

reproduce the issue. generate some traffic against the monitored web server and its urls, where javascript injection is not seen while checking using web browser and its web developer mode or similar..

collect and send the HTTP server error log file (e.g. /opt/IBM/HTTPServer/logs/error_log)

In this http server error log file, you should find messages starting with:
"injectCode: formattedString" and then the value of "wrt_request_url" is the accessed URL of the request.

Example of error_log content :

[Wed Oct 24 19:46:03 2018] [notice] injectCode: formattedString: \n<script type="text/javascript">var wrt_request_id='00001008000578fde5f29a3400000034';var wrt_request_url='xxxxx/index.html';var wrt_correlator='00000F88000578fdc562d25a00000001';</script>\n<script language="JavaScript" src="wrt_perf_timing.js" type="text/javascript"></script>

5) Current limitations of RT agent:

RT agent can get data from :

Packet Analyzer

or from

IBM HTTP Server Response Time module.

 

About Packet Analyzer:

By default the Packet Analyzer only monitors content type 'text/html'. With some setting change, it can monitor other requests (*).

The Packet Analyzer supports to monitor gzip compressed requests.
(*) For Packet Analyzer to monitor other request, you can refer to the following link which gives an example with 'old' WRT 7.4, but can be still useful:
https://www.ibm.com/support/pages/node/1088044

RT agent is typically used to monitor the performance and availability of web-based applications. By default It only support pure HTTP request (text/html)

About  IBM HTTP Server Response Time module:

The IBM HTTP Server Response Time module have the following limitations:

- The IBM HTTP Server Response Time module with Javascript Injection can currently monitor only http content type 'text/html'.
- Without Javascript Injection, the IBM HTTP Server Response Time module can currently monitor content type where Content-Type is text/html, application/xml or application/json.
- The IBM HTTP Server Response Time module can not currently javascript instrument gzip compressed requests.

Document Location

Worldwide


[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJUL","label":"IBM Application Performance Management"},"Component":"response time","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1.4","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
IBM Application Performance Management

Software version:
8.1.4

Document number:
1088056

Modified date:
16 October 2019

UID

ibm11088056

Manage My Notification Subscriptions