From fee533cf08a4be1e2f8276f782c8dcb62e3af8b2 Mon Sep 17 00:00:00 2001 From: Marco Mader Date: Thu, 7 Feb 2019 13:05:43 +0100 Subject: [PATCH 1/3] Add iOrigin Header and update Readme link --- README.md | 2 +- bin/compile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa805f6..7e1ee65 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This buildpack deploys the [Dynatrace OneAgent] to automatically monitor the per ### Installation -To integrate Dynatrace OneAgent into your existing project you need to add the Dynatrace buildpack to your project's buildpacks and set your Dynatrace environment ID and token. For complete details, please see the [Dynatrace Heroku installation guidelines](https://www.dynatrace.com/support/help/cloud-platforms/). +To integrate Dynatrace OneAgent into your existing project you need to add the Dynatrace buildpack to your project's buildpacks and set your Dynatrace environment ID and token. For complete details, please see the [Dynatrace Heroku installation guidelines](https://www.dynatrace.com/support/help/cloud-platforms/heroku/how-do-i-monitor-heroku-applications/). ```shell # Add the Dynatrace buildpack diff --git a/bin/compile b/bin/compile index 5a78558..99901d7 100644 --- a/bin/compile +++ b/bin/compile @@ -19,6 +19,7 @@ source "$BP_DIR/lib/stdlib.sh" downloadAgent() { local DOWNLOADURL=$1 local INSTALLERFILE=$2 + local IORIGINHEADER='x-dynatrace-iorigin:heroku' # determine ssl mode local SSL_INSECURE_CURL="" @@ -30,9 +31,9 @@ downloadAgent() { fi if curl -h &> /dev/null ; then - local DOWNLOADCOMMAND="curl -fL --connect-timeout 10 $SSL_INSECURE_CURL ${DOWNLOADURL} -o ${INSTALLERFILE}" + local DOWNLOADCOMMAND="curl -fL --connect-timeout 10 $SSL_INSECURE_CURL ${DOWNLOADURL} -o ${INSTALLERFILE} --header ${IORIGINHEADER}" elif wget -h &> /dev/null ; then - local DOWNLOADCOMMAND="wget --connect-timeout=10 $SSL_INSECURE_WGET ${DOWNLOADURL} -O ${INSTALLERFILE}" + local DOWNLOADCOMMAND="wget --connect-timeout=10 $SSL_INSECURE_WGET ${DOWNLOADURL} -O ${INSTALLERFILE} --header=${IORIGINHEADER}" else puts_error "Neither curl nor wget executable found!" exit 1 From ff10ee999bb270db42f0717ed654c0f26ff79884 Mon Sep 17 00:00:00 2001 From: Marco Mader Date: Mon, 11 Feb 2019 09:44:28 +0100 Subject: [PATCH 2/3] User UserAgent instead iOrigin --- bin/compile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/compile b/bin/compile index 99901d7..7d1f3dd 100644 --- a/bin/compile +++ b/bin/compile @@ -19,7 +19,7 @@ source "$BP_DIR/lib/stdlib.sh" downloadAgent() { local DOWNLOADURL=$1 local INSTALLERFILE=$2 - local IORIGINHEADER='x-dynatrace-iorigin:heroku' + local USERAGENT='x-dynatrace-iorigin:heroku/1.0' # determine ssl mode local SSL_INSECURE_CURL="" @@ -31,9 +31,9 @@ downloadAgent() { fi if curl -h &> /dev/null ; then - local DOWNLOADCOMMAND="curl -fL --connect-timeout 10 $SSL_INSECURE_CURL ${DOWNLOADURL} -o ${INSTALLERFILE} --header ${IORIGINHEADER}" + local DOWNLOADCOMMAND="curl -fL --connect-timeout 10 $SSL_INSECURE_CURL ${DOWNLOADURL} -o ${INSTALLERFILE} -A ${USERAGENT}" elif wget -h &> /dev/null ; then - local DOWNLOADCOMMAND="wget --connect-timeout=10 $SSL_INSECURE_WGET ${DOWNLOADURL} -O ${INSTALLERFILE} --header=${IORIGINHEADER}" + local DOWNLOADCOMMAND="wget --connect-timeout=10 $SSL_INSECURE_WGET ${DOWNLOADURL} -O ${INSTALLERFILE} --user-agent=${USERAGENT}" else puts_error "Neither curl nor wget executable found!" exit 1 From c779821314618c1eca8605da16d3528c3b52d59c Mon Sep 17 00:00:00 2001 From: Marco Mader Date: Mon, 11 Feb 2019 10:22:11 +0100 Subject: [PATCH 3/3] Remove i-dynatrace-iorigin value from UA --- bin/compile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 7d1f3dd..5e7ad21 100644 --- a/bin/compile +++ b/bin/compile @@ -19,7 +19,7 @@ source "$BP_DIR/lib/stdlib.sh" downloadAgent() { local DOWNLOADURL=$1 local INSTALLERFILE=$2 - local USERAGENT='x-dynatrace-iorigin:heroku/1.0' + local USERAGENT='heroku/1.0' # determine ssl mode local SSL_INSECURE_CURL=""