Deploy OneAgent on Azure App Service

Dynatrace provides an Azure Site-Extension to install OneAgent on Azure App Services. Site Extensions are the native extension mechanism provided via Kudu, which is the deployment management engine behind Azure App Services.

Azure Site-Extension

How the Site Extension for OneAgent works

The extension doesn't include the OneAgent installer. Instead, the extension uses the Dynatrace REST-API to download the latest installer from the cluster, unless a OneAgent default version is configured.

Agent updates aren't automatically provided through OneAgent. For more information about how updates are applied, see How to update OneAgent on App Services


Additional configuration parameters

Server URl
If you're using Dynatrace Managed or your cluster traffic should be routed through an ActiveGate, you need to configure the API endpoint used by the extension for downloading OneAgent.

<YourDynatraceServerURL> and <YourEnvironmentID> need to be replaced. The URL pattern for the API endpoint is as follows: https://<YourDynatraceServerURL>/e/<YourEnvironmentID>/api


Azure Resource Manager provides a consistent management layer to perform tasks through Azure PowerShell, Azure CLI, Azure portal, REST API, and client SDKs.

Install the Site Extension for OneAgent

  1. Navigate to the App Service where you want to add the OneAgent.

  2. Select Extensions and click Add.
    Add Azure Site-Extension

  3. Select Dynatrace OneAgent from the list of extensions. Azure Site-Extension

  4. Accept the legal terms and click OK to install the extension.

  5. To activate and access the extension you need to restart Kudu. Restart Kudu

Configure the Site Extension for OneAgent

The extension comes with its own UI for easier configuration.

  1. Access the extensions UI through either the "Browse" link in the portal... Installed Azure Site-Extension

...or by directly browsing to the extension using https://<Your-AppService-Subdomain>

For more details on how to access the Kudu service and its extensions see Accessing the Kudu service.

  1. Apply the configuration as required Configure Azure Site-Extension

  2. Click Install OneAgent and monitor progress/status until indicating that OneAgent is installed. Azure Site-Extension Status

  3. Finally, restart the App Service to recycle the applications worker process, allowing OneAgent to monitor your application.

Note: To reliably restart your applications worker process, use Stop/Start.

Overriding OneAgent configuration

The following parameters can be used to set/override default configurations

Parameter Description
DT_CONNECTION_POINT Semi-colon separated list of communication-endpoints

Using multiple deployment slots

As Azure App Service deployment slots are treated like full-fledged application service instances, you need to enable the Site-Extension for OneAgent on each deployment slot you want monitored by Dynatrace.

For details on configuring deployment slots, see Microsoft Documentation - Staged Publishing.

If you're using application settings to additionally configure certain OneAgent options, make sure the additional settings are also applied to the deployment slots as well.


"No route registered for '/dynatrace/'" when accessing the Site Extension

This error message appears if Kudu hasn't been restarted after the Site Extension was installed.


To restart, follow step #5 as described in Install the Site Extension for OneAgent.

Alternatively you can restart Kudu directly in the Kudu console or kill the scm worker process in the Kudu process explorer.

Keep in mind, if you've enabled the extension on multiple deployment slots, you have to do this for each deployment slot

"503 Service Unavailable" for Web App and Kudu

The Site Extension for OneAgent registers IIS modules. If registration is complete but the actual IIS module files aren't in place (or corrupt), the App Service might return a 503 Service Unavailable message. Also, the Kudu AppPool will no longer be available, which effectively means that you can no longer fix your installation via Kudu.


By adding the following setting in Application Settings


Deactivate all site extensions.

This setting gives you access to Kudu once again. Reinstall the site extension and set WEBSITE_PRIVATE_EXTENSIONS=1 (or remove the setting entirely). Following application restart, everything should work again, including Dynatrace monitoring.

Where can I find log-files to troubleshoot

The extension's log-files are located in the extensions-folder: D:\home\SiteExtensions\Dynatrace\

The OneAgent log-files are located in D:\home\SiteExtensions\Dynatrace.Agent\\log. You might have multiple sub-directories D:\home\SiteExtensions\Dynatrace.Agent\ caused by agent updates.