diff --git a/README.md b/README.md index 3beb6f3..e6d06f3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ _Note: Currently Java, NODE, .NET, PHP and Python are supported._ ##### Node, .NET, PHP or Python Add the following to the startup command box - curl -s https://raw.githubusercontent.com/DataDog/datadog-aas-linux/v1.8.1/datadog_wrapper | bash + curl -s https://raw.githubusercontent.com/DataDog/datadog-aas-linux/v1.9.0/datadog_wrapper | bash ![](https://p-qkfgo2.t2.n0.cdn.getcloudapp.com/items/8LuqpR7e/6a9bf63d-5169-49d0-a68a-20e6e3009d47.jpg?v=7704a16bc91a6a57caf8befd84204415) diff --git a/datadog_wrapper b/datadog_wrapper index edbe322..d9ded55 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -5,6 +5,9 @@ main() { export DD_AZURE_APP_SERVICES=1 export DD_HOSTNAME="none" + # Remote Config does not work in AAS. It must be disabled. + export DD_REMOTE_CONFIGURATION_ENABLED=false + if [ -z "${DD_CHDIR}" ]; then CURRENT_DIR=$(pwd) else @@ -62,7 +65,7 @@ setEnvVars() { fi if [ -z "${DD_AAS_LINUX_VERSION}" ]; then - DD_AAS_LINUX_VERSION="v1.8.1" + DD_AAS_LINUX_VERSION="v1.9.0" fi if [ -z "${DD_BINARY_DIR}" ]; then @@ -84,24 +87,17 @@ setEnvVars() { } getRuntimeDependencies() { - # There are multiple base images used for runtimes. We need to ensure all required dependencies are available. - if [ "${WEBSITE_STACK}" == "JAVA" ]; then - DD_JAVA_VERSION=$(java -fullversion 2>&1 | awk -F'[".]' '{print $2}') - fi - - if [ "${WEBSITE_STACK}" == "TOMCAT" ]; then - DD_TOMCAT_VERSION=$(echo "${TOMCAT_VERSION}" | awk -F. '{print $1}') - fi - - - if [ "${WEBSITE_STACK}" == "PHP" ] || [ "${DD_JAVA_VERSION}" == "17" ] || [ "${DD_TOMCAT_VERSION}" == "10" ]; then - apt-get update && apt-get install -y unzip - fi - - # output is openjdk full version "1.8.0_345-b01" for java 8 and openjdk full version "17.0.7+7-LTS" for 17 - if [ "${DD_JAVA_VERSION}" == "1" ] || [ "${DD_JAVA_VERSION}" == "11" ] ||[ "${DD_TOMCAT_VERSION}" == "9" ]; then - apk add curl - apk add libc6-compat + # If we are in Java, Tomcat or PHP stacks, we need to find the linux type to install unzip and curl + if [ "${WEBSITE_STACK}" == "JAVA" ] || [ "${WEBSITE_STACK}" == "TOMCAT" ] || [ "${WEBSITE_STACK}" == "PHP" ]; then + LINUX_VERSION_NAME=$(. "/etc/os-release"; echo "$ID") + if [ "${LINUX_VERSION_NAME}" == "ubuntu" ] || [ "${LINUX_VERSION_NAME}" == "debian" ]; then + apt-get update + apt-get install -y unzip + apt-get install -y curl + else + apk add curl + apk add libc6-compat + fi fi }