Browser Agent 10.3 Troubleshooting

Document ID : KB000091945
Last Modified Date : 18/04/2018
Show Technical Document Details
BrowserAgent 10.3  - troubleshooting and checklist
APM Java Agent 10.3

1. General Guidelines

- browseragent.pbd is included in IntroscopeAgent.profile
- BrowserAgentExt.jar is under wily/core/ext
- introscope.agent.browseragent.enabled=true in the IntroscopeAgent.profile
- introscope.agent.browseragent.sustainabilityMetrics.enabled=true in the IntroscopeAgent.profile
- When agent is starting, verify if AutoProbe log has the log for “inserted method tracer object allocation: com/wily/introscope/agent/brtm/trace/BrtmTracer”
- Include below extra properties in IntroscopeAgent.profile to start agent log and browser log:, logfile
- Already clean up browser cache, download files, and restart browser before troubleshooting


2. Summary Checklist

Step#1: Check if the JavaScript snippet code is inserted into the page using browser network tab:  search for “WilyCmd” keyword in the source code of the page.

If not found: check agent log to understand why agent doesn’t insert snippet code
- the request/URL is excluded for exclude/include property setting

- current agent has reached the resource limitation (how many pages and agent can monitor)
verify in sustainability metrics introscope.agent.browseragent.resource.count and introscope.agent.browseragent.resourceLimit), can be solved by increasing the introscope.agent.browseragent.resourceLimit property value in agent profile

- current agent has reached throttle limitation (calculated on the agent side every 15 seconds, if current response has reached limited, we wil not inserted the snippet in the following request)
verify in sustainability metrics introscope.agent.browseragent.throttleResponse.count and introscope.agent.browseragent.throttleResponseLimit, can be solved by increasing the introscope.agent.browseragent.throttleResponseLimit property value in agent profile or try to visit page again

-check if Content-type of the response is not “text/html” (check in the agent log “shouldWriteJavaScript contentTypeIncludesTextHtml: true(text/html)” )

-check if Content-encoding is set in the response when agent is processing the response (check in the agent log “shouldWriteJavaScript m_contentEncoding: gzip” )

-Check sustainability metric introscope.agent.browseragent.snippet.maxSearchingReached.count – we don’t seach for the snippet in the whole page content.  If required increase the maximum content legth value in the introscope.agent.brtm.snippet.maxSearchingLength  

Step#2: Check if there is a “?WilyCmd=cmdJS” request in developer tools Network tab wit BIG javascript file response -- to check problems accessing BIG js

If not found:
-Check if the request is running in unsupported browser (verifying the value of browser agent sustainability metric - “introscope.agent.browseragent.unsupportedBrowsers.count” is greater than 1 or there is a “?WilyCmd=cmdMetric” request without real performance data in post parameter)
- Check if there are errors in developer tools Console tab

If found, but no BIG javascript file download:
-check if there are some errors in the developer tools Console tab
-check if errors in server log (access log)
-check the related processing login the agent “processWilyRequest…cmdJS…”

Step#3: Check if there is a “?WilyCmd=cmdMetrics” request in developer tools Network tab.

If not found:
-Check if there are errors or useful information in developer tools Console tab
-Check sustainability metrics:
to see if the values are too high.

If found:
-check if there is “Sending POST with…” log in developer tool Console tab and make sure the post parameters format is accurate
-check the related processing log in agent “processWilyRequest…cmdMetrics…”
-check if errors in server log (access log)

3. Common situation:

No application run time issue and no snippet insertion into the request

If there is application run into issue with some requests and the snippet code is found on the page:
- Look at details in agent log and sustainability metrics
- Check if the snippet is inserted in the correct place
- Try to include the full URL of the page that you want to instrument introscope.agent.browseragent.includeURLList property
- Try to exclude the full URL of problematic request using introscope.agent.browseragent.excludeURLList property
- Try to redirect the wily request to different URL :
Change where to download big js file:  add introscope.agent.browseragent.wilyURL property
Change where to send browser metrics: modify wily request location in snippet.js in BrowserAgentExt.jar(/js-clear) - see below
Replace snippet.js in BrowserAgentExt.jar(/js) with the new snippet.js
Or place new snippet.js somewhere and add introscope.agent.browseragent.snippetLocation property

How to modify wily request in snippet.js (BrowserAgentExt.jar /js-clear) ?
- Locate this line:
instrumentationLocation : window.location.protocol + "//" + + window.location.pathname,

- Change the line to:
instrumentationLocation : "http://localhost:5080/myPath",

- Locate this line: var postURL = window.location.protocol + "//" + + window.location.pathname + "?WilyCmd=cmdMetrics";

- Change the line to: var postURL = "http://localhost:5080/myPath?WilyCmd=cmdMetrics",

4. Known issues:

Defect DE142542: JS Function Instrumentation is ignored when JS functions are invoked within setTimeout, setInterval etc..
-Noticed in: CA APM 10.3, all browsers
-Symptom: JavaScript timing event methods like setInterval and setTimeout create a context of their own for the invoked function. This design is problematic for Browser Agent because it cannot obtain these contexts. Thus, Browser Agent cannot instrument such JavaScript functions.
-Workaround: We recommend customers to use an anonymous function to invoke the interested function:

var insterestedFunc = function(){};
setInterval(interestedFunc, 5000); --> will NOT send js function metrics for interestedFunc
setInterval(function(){ interestedFunc(); }, 5000); --> will send js function metrics for interestedFunc (recommended)

Defect DE42472 - Business Transaction Trace Issues for the Root Directory
-Noticed in: WebLogic
-Symptom: For top-level pages, business transaction matching and transaction trace issues can occur when visiting the root directory. This symptom occurs when your application does not explicitly redirect to the corresponding index page, for example: http://SERVER_HOSTNAME:SERVER_PORTNUMBER/myapp/ To: http://SERVER_HOSTNAME:SERVER_PORTNUMBER/myapp/index.html
-Solution: When using the includeURLList property and you want to include the top-level page, specify both the root directory and the index page, for example:
Failure to include both URLs (or a regex that matches both) in the includeURLList property can result in only receiving metrics when the index page URL is visited. Use a similar format for the excludeURLList property when excluding the top-level page.

Defect DE137799 - Mobile Safari 8 Page Load Metrics Are Not Sent on First Page Load
-Noticed in: Mobile Safari 8
-Symptom: Browser Agent page load metrics are not sent on the first page load of a new session. Inconsistencies of 200-300 ms occur between page load metrics from Mobile Safari 8 and other supported browsers.
-Workaround: This behavior occurs because Mobile Safari 8 does not support the Navigation Timing API. Metrics are not sent on the first visit of any page.
As a workaround, refresh the page for which the metrics do not appear or are inconsistent.

Defect DE154433 - Download JavaScript File Issues for the Root Directory in WebSphere
Noticed in: IBM WebSphere
-Symptom: In the root directory page of WebSphere, the WilyCmd=cmdJS request does not download a large JavaScript file in response.
-Go to /core/config and open the IntroscopeAgent.profile file in a text editor.
-Enable and configure the "introscope.agent.browseragent.wilyURL" property to use a static URL, for example: "http://localhost:5080/myPath?WilyCmd=cmdMetrics".
-Verify that the agent processes this static URL using the “?WilyCmd=cmdMetrics” query string, for example: http://localhost:5080/myPath?WilyCmd=cmdMetrics.
-Go to /core/config and open the IntroscopeAgent.profile file in a text editor.
-Add the Introscope.agent.browseragent.snippetLocation= property, for example: S:/sw/ibm/WebSphere85/AppServer/wily_server1/examples/APM/BrowserAgent/js/snip pet.js.
-Save and close the file.
-Open the snippet.js file in a text editor. (Note: The default snippet.js location is /wily/examples/APM/BrowserAgent/js/snippet.js.)
-Locate this line:
instrumentationLocation : window.location.protocol + "//" + + window.location.pathname,
-Change the line to:
instrumentationLocation : http://localhost:5080/myPath
-Locate this line:
var postURL = window.location.protocol + "//" + + window.location.pathname + "?WilyCmd=cmdMetrics";
- Change the line to:
var postURL = http://localhost:5080/myPath?WilyCmd=cmdMetrics
- Save and close the file.
- Restart the application or application server.