Download PDF
Download page Upgrade the JavaScript Agent.
Upgrade the JavaScript Agent
This page covers how to upgrade the JavaScript Agent version. Upgrading to the latest version of the JavaScript Agent will allow you to use the latest features and get the latest bug fixes.
The following sections will discuss possible compatibility issues, show you a new way to include the JavaScript Agent, and provide you with manual injection code examples for the different JavaScript Agent hosting options.
Compatibility Issues
- If you are using a SaaS EUM Cloud and want a hosted version of
adrum.js
, we recommend you to use theadrum-latest.js
version. However, you can use any version of the JavaScript Agent as it is compatible with any SaaS EUM Cloud version currently being deployed. - For Controller versions, a JavaScript Agent version is compatible with Controller versions with the same or older versions.
For more information, see Controller Compatibility with Operating Systems and Components.
Injection Code Changes
If the URL to the server hosting your JavaScript Agent is the same for both HTTP and HTTPS, you should no longer use document.write
to inject the <script>
tag. Instead, just hardcode the <script>
tag with the following syntax:
<script src="//cdn.appdynamics.com/adrum/adrum.js"></script>
Injection Code for Different Hosting Options
The injection code will vary slightly depending on your deployment (SaaS/on-premises). The following provides you with code snippets for each type of deployment. Be sure to place the code snippets below right after the <head>
tag.
In the string below:
- Replace the string
<EUM_APP_KEY>
in the code below with your own EUM app key. - Replace
<
eum-col.appdynamics.com
>
in the code below with your corresponding collector URL.
<script charset='UTF-8'>
window['adrum-start-time'] = new Date().getTime();
(function(config){
config.appKey = '<EUM_APP_KEY>';
config.adrumExtUrlHttp = 'http://cdn.appdynamics.com';
config.adrumExtUrlHttps = 'https://cdn.appdynamics.com';
config.beaconUrlHttp = 'http://eum-col.appdynamics.com';
config.beaconUrlHttps = 'https://eum-col.appdynamics.com';
config.xd = {enable : false};
})(window['adrum-config'] || (window['adrum-config'] = {}));
<script src='//cdn.appdynamics.com/adrum/adrum-latest.js'></script>
In the code snippet below:
- Replace the string
<EUM_APP_KEY>
with your own EUM app key. - Replace the string
<your-cdn.com>
with the URL to your server hosting the JavaScript Agent. - Replace
<
eum-col.appdynamics.com
>
in the code below with your corresponding collector URL.
<script charset='UTF-8'>
window['adrum-start-time'] = new Date().getTime();
(function(config){
config.appKey = '<EUM_APP_KEY>';
config.adrumExtUrlHttp = 'http://<your-cdn.com>';
config.adrumExtUrlHttps = 'https://<your-cdn.com>';
config.beaconUrlHttp = 'http://eum-col.appdynamics.com';
config.beaconUrlHttps = 'http://eum-col.appdynamics.com';
config.xd = {enable : false};
})(window['adrum-config'] || (window['adrum-config'] = {}));
</script>
<script src='//<your-cdn.com>/adrum/adrum.js'></script>
In the code snippet below:
- Replace the string
<EUM_APP_KEY>
with your own EUM app key. - Replace the string
<your-cdn.com>
with the URL to where you're hosting the JavaScript Agent. - Replace
<
eum-col.appdynamics.com
>
in the code below with your corresponding collector URL.
<script charset='UTF-8'>
window['adrum-start-time'] = new Date().getTime();
(function(config){
config.appKey = '<EUM_APP_KEY>';
config.adrumExtUrlHttp = 'http://cdn.appdynamics.com';
config.adrumExtUrlHttps = 'https://cdn.appdynamics.com';
config.beaconUrlHttp = 'http://eum-col.appdynamics.com';
config.beaconUrlHttps = 'https://eum-col.appdynamics.com';
config.xd = {enable : false};
})(window['adrum-config'] || (window['adrum-config'] = {}));
</script>
<script src='//<your-cdn.com>/adrum/adrum.js'></script>