Support for on prem eum

This commit is contained in:
Steve Waterworth
2018-03-08 12:16:15 +00:00
parent b0ebe35301
commit 668e53897f
3 changed files with 14 additions and 1 deletions

View File

@@ -75,3 +75,5 @@ A separate load generation utility is provided in the *load-gen* directory. This
## End User Monitoring
To enable End User Monitoring (EUM) see the official [documentation](https://docs.instana.io/products/website_monitoring/) for how to create a configuration. There is no need to inject the javascript fragment into the page, this will be handled automatically. Just make a note of the unique key and set the environment variable INSTANA_EUM_KEY for the *web* image, see *docker-compose.yaml* for an example.
If you are running the Instana backend on premise, you will also need to set the Reporting URL to your local instance. Set the environment variable INSTANA_EUM_REPORTING_URL as above. See the Instana EUM API [reference](https://docs.instana.io/products/website_monitoring/api/#api-structure)

View File

@@ -14,7 +14,17 @@ fi
if [ -n "$INSTANA_EUM_KEY" ]
then
echo "Enabling Instana EUM"
sed -e "/ineum/s/INSTANA_EUM_KEY/$INSTANA_EUM_KEY/" $BASE_DIR/eum-tmpl.html > $BASE_DIR/eum.html
TMP_FILE=$(mktemp)
sed -e "/ineum/s/INSTANA_EUM_KEY/$INSTANA_EUM_KEY/" $BASE_DIR/eum-tmpl.html > $TMP_FILE
if [ -n "$INSTANA_EUM_REPORTING_URL" ]
then
echo "Setting reporting url $INSTANA_EUM_REPORTING_URL"
sed -e "/<\/script>/ i inuem('reportingUrl', '$INSTANA_EUM_REPORTING_URL');" $TMP_FILE > $BASE_DIR/eum.html
else
cp $TMP_FILE $BASE_DIR/eum.html
fi
rm $TMP_FILE
else
cp $BASE_DIR/empty.html $BASE_DIR/eum.html
fi

View File

@@ -5,6 +5,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//eum.instana.io/eum.min.js','ineum');
ineum('apiKey', 'INSTANA_EUM_KEY');
ineum('page', 'Shop');
</script>
<!-- EUM include end -->