This solution leverages the startup command setting and Application Settings for Linux Azure App Service to both instrument the back-end application such as Java, Node, .NET Core.

It involves two steps

1. Set Atatus configuration In Environment variables
2. Add Atatus wrapper in startup command

1. Set Atatus configuration In Environment variables

To instrument your application, begin by adding the following values under App Services -> Settings -> Environment variables in your Azure app settings.

Azure_app

Environment Values

ATATUS_START_APP - Startup Commands for your applications, see below
ATATUS_APP_NAME - Name of your project/app/service.
ATATUS_LICENSE_KEY - APM License Key of your Atatus account.
ATATUS_ANALYTICS - (optional) App Analytics collects all requests individually with contextual data. Possible values are true, false
ATATUS_CAPTURE_BODY - (optional) This setting allows for capturing the body in API analytics. Possible values are all, request, or response.

Startup commands for different backend languages

Runtime ATATUS_START_APP Description
Node.js node ./bin/www Runs the Node your script file, or PM2 configuration file.
.NET Core dotnet myApp.dll Ensure that the .dll file name specified in the command matches the actual name of your .dll file. In some situations, this may differ from your Web App’s name..
Java java -jar /home/site/wwwroot/app.jar The command for starting your app. This is not needed for applications running in Tomcat.

2. Add Atatus wrapper in startup command

Node.js & .NET Core

Go to App Services -> settings -> Configuration and add the following to the Startup Command field:

curl -s https://raw.githubusercontent.com/atatus/atatus-aas-linux/v1.0.0/atatus_wrapper.sh | bash

Azure_app

Java

Download the atatus_wrapper file from the releases and upload it to your application with the Azure CLI command:

  az webapp deploy --resource-group <group-name> --name <app-name> --src-path ./atatus_wrapper.sh --type=startup

Once Startup Command added in your settings, you need to restart your application from azure app service.