From b8d658a94867c694a944458c48311f5ebd1512d7 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 31 Jan 2022 10:17:46 +0100 Subject: [PATCH] improve instana monitoring --- .env | 1 + README.md | 5 +---- index.js | 1 + package.json | 1 + yarn.lock | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..1455f97 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +INSTANA_MONITORING=false \ No newline at end of file diff --git a/README.md b/README.md index 0996b2c..9e231d2 100755 --- a/README.md +++ b/README.md @@ -84,10 +84,7 @@ See [Contributing](https://github.com/orangecoding/fredy/blob/master/CONTRIBUTIN ### Monitoring _Fredy_ can be monitored by [Instana](https://www.instana.com). If you are interested, sign up for a free trial. This is totally optional of course :) -If you want to use Instana to monitor _Fredy_, you have to set an environment variable to true before starting _Fredy_. -``` -SET INSTANA_MONITORING=true -``` +If you want to use Instana to monitor _Fredy_, please change the variable `INSTANA_MONITORING` in the `.env` file to `true`. # Docker Use the Dockerfile in this repository to build an image. diff --git a/index.js b/index.js index 36406b6..d44d22f 100755 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +require('dotenv').config(); /********OPTIONAL INSTANA INITIALIZATION BEGIN********/ //if you want to use Instana to monitor fredy, go to https://www.instana.com and // try it yourself by signing up for a free trial diff --git a/package.json b/package.json index 26ce46b..9efaa7b 100755 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "axios-retry": "^3.2.4", "body-parser": "1.19.0", "cookie-session": "1.4.0", + "dotenv": "^15.0.0", "handlebars": "4.7.7", "highcharts": "9.3.1", "highcharts-react-official": "3.1.0", diff --git a/yarn.lock b/yarn.lock index 549bfd8..e3de0ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3119,6 +3119,11 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" +dotenv@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-15.0.0.tgz#2a585639429bf2c2c62f387f0fffde9c75aafde0" + integrity sha512-/l1sXXm79ry34KwwS0y4oVZjB468iw/6u9g1W26dtexKcIJAnVL2pMF+hxQwzZ7LutxOwEgtym9eIxvX33CMKg== + dtrace-provider@~0.8: version "0.8.8" resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e"