Upgrade the JavaScript Agent
Related pages:
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.
互換性の 問題
- SaaS EUM クラウドを使用していて、adrum.js のホステッドバージョンが必要な場合は、 adrum-latest.js バージョンを使用することを推奨しますが、任意のバージョンの JavaScript エージェントを使用できます。これは、現在展開されている SaaS EUM クラウドのバージョンと互換性があるためです。
- コントローラバージョンの場合、JavaScript エージェントバージョンは、同じバージョンまたは古いバージョンのコントローラバージョンと互換性があります。
詳細については、「エージェントとコントローラの互換性」を参照してください。
インジェクションコードの変更
javascript エージェントをホストしているサーバーへの URL が HTTP と HTTPS の両方で同じである場合は、<script> タグの挿入に document.write は使用しないでください。代わりに、次のシンタックスを使用して <script> タグをハードコーディングするだけです。
<script src="//cdn.appdynamics.com/adrum/adrum.js"></script>
さまざまなホスティングオプションのインジェクションコード
- Splunk AppDynamics CDN
-
次の文字列では、
- 次のコードの文字列 <EUM_APP_KEY> を独自の EUM アプリケーションキーに置き換えます。
- 次のコードの <eum-col.appdynamics.com> を、対応するコレクタ URL に置き換えます。
JSON<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>
- 自己ホスト
-
次のコードスニペットでは、
- 文字列 <EUM_APP_KEY> を独自の EUM アプリケーションキーに置き換えます。
- 文字列 <your-cdn.com> を JavaScript エージェントをホスティングしているサーバへの URL に置き換えます。
- 次のコードの <eum-col.appdynamics.com> を、対応するコレクタ URL に置き換えます。
JSON<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>
- 共有ホスト
-
次のコードスニペットでは、
- 文字列 <EUM_APP_KEY> を独自の EUM アプリケーションキーに置き換えます。
- 文字列 <your-cdn.com> を JavaScript エージェントをホスティングしている場所への URL に置き換えます。
- 次のコードの <eum-col.appdynamics.com> を、対応するコレクタ URL に置き換えます。
JSON<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>