AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

Skip to end of metadata
Go to start of metadata

Sometimes the standard manual injection scenario is not appropriate for your installation.  Use the following options to customize the process for your needs. 

Using a Single JavaScript Agent for Multiple Applications

To use the same copy of the JavaScript agent for EUM (adrum.js) to cover multiple applications, you need to specify the app key for each application by setting up a variable in a small script that precedes the agent script. This is necessary because by default the application key is embedded in the agent script.

To set this up:

1. Download the JavaScript agent for EUM. See Download and Include the Agent for general instructions on downloading and including the JavaScript agent for EUM using manual injection.

2. For each of your apps, add a line to the "start-time" script, shown in the red box below, to the header of each page right after the <head> tag, and any <meta> tags, before the entry that includes the location of the agent (adrum.js):

window["adrum-app-key"] = "<app-key-for-this-app>";

The app key for each of your apps is displayed in the relevant EUM configuration screen under Advanced->Customize your Deployment.

After you include the variable line, the start-time line and the agent, the <head> section in your EUM-monitored web pages should resemble the following example, although your app key will naturally be different for every app:

<head>
<script>
window["adrum-app-key"] = "AD-AAB-AA-AFB";
window["adrum-start-time"] = new Date().getTime();
</script>
<script src="/adrum.js"></script>
. . .
. . .
</head>

Using a Hosted Version of the JavaScript Agent

AppDynamics maintains a hosted copy of the latest version of the main JavaScript agent file, adrum.js, on Amazon CDN. The file is located at

http://de8of677fyt0b.cloudfront.net/adrum/adrum-latest.js

Previous versions of the agent can be found at

http://de8of677fyt0b.cloudfront.net/adrum/adrum-VERSION.js

where VERSION is the version number (for example, 3.7.16.0) you want to access.

To use the hosted version of the JavaScript agent instead of one located on your local system:

1. Open the JavaScript Instrumentation tab.

2. You do not need to download the JavaScript agent.

3. Add a line in the script, shown in the red box above, indicating your app key. The script must be in the header of the page directly after the <head> tag. This entry must be before the entry that includes the location of the agent (adrum.js). You must specify the app key if you are using the hosted script:

window["adrum-app-key"] = "<app-key-for-this-app>";

Your app key is displayed under Advanced->Customize your Deployment.

4. Optional: If you want to use a custom geo-server with the hosted version of the script, you also need to add a line defining the custom geo URL:

window["adrum-geo-resolver-url"] = "<the URL, including the context root, of your custom geo-server>";

For more information on using a custom geo-server, see Use a Custom Geo Server For Web EUM.

5. Edit the path for adrum.js to point to the hosted location on Amazon:

<script src="http://de8of677fyt0b.cloudfront.net/adrum/adrum-latest.js">

After you include the app key, the start-time line, the custom geo-server URL (optional), and the agent URL, the <head> section in your EUM-monitored web page should resemble the following example, although your details will be somewhat different:

<head>
<script>
window["adrum-app-key"] = "AD-AAB-AUM";
window["adrum-start-time"] = new Date().getTime();
window["adrum-geo-resolver-url"]="https://mygeo.acme.com/geo";
</script>
<script src="http://de8of677fyt0b.cloudfront.net/adrum/adrum-latest.js">
. . .
. . .
</head>

Learn More