Skip to content

Commit 69dbac1

Browse files
authored
feat: LogRocket integration (#365)
* Add logrocket * Add env file * Add TODO * Fix package.json * Cleanup * Yarn.lock * Linter
1 parent b02aadb commit 69dbac1

File tree

7 files changed

+25
-3
lines changed

7 files changed

+25
-3
lines changed

frontend/.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
VUE_APP_GRAPHQL_ENDPOINT=http://localhost:3000/graphql # TODO: Application specific
55
VUE_APP_NAME=flox-test # TODO: Application specific
66
VUE_APP_AWS_REGION=eu-central-1 # TODO: Application specific
7-
VUE_APP_USER_POOL_ID=eu-central-1_dfN0W5Nfh # TODO: Application specific
8-
VUE_APP_USER_POOL_CLIENT_ID=3v1adi0ebmc1kibgisphe6qc23 # TODO: Application specific
7+
VUE_APP_USER_POOL_ID=eu-central-1_dfN0W5Nfh
8+
VUE_APP_USER_POOL_CLIENT_ID=3v1adi0ebmc1kibgisphe6qc23

frontend/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"joi": "^17.4.2",
4545
"lodash": "^4.17.21",
4646
"lodash-es": "^4.17.21",
47+
"logrocket": "^3.0.1",
4748
"pinia": "^2.0.17",
4849
"qrcode.vue": "^3.3.3",
4950
"quasar": "^2.7.7",

frontend/src-pwa/custom-service-worker.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
import { precacheAndRoute } from 'workbox-precaching'
88

99
// Use with precache injection
10+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
1011
precacheAndRoute(self.__WB_MANIFEST)

frontend/src/App.vue

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import {RouterService} from 'src/services/RouterService';
1111
import {routerInstance} from 'boot/router';
1212
import {isModuleActive} from 'src/flox';
1313
import {MODULES} from 'src/flox/MODULES';
14+
import LogRocket from 'logrocket';
15+
16+
// Add LogRocket to production deployments / builds
17+
if(process.env.VUE_APP_PRODUCTION === 'true'){
18+
LogRocket.init('md69mq/flox'); // TODO application specific: Change LogRocket ID
19+
}
1420
1521
// Quasar
1622
const $q = useQuasar()

frontend/yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -11534,6 +11534,11 @@ loglevel@^1.6.8:
1153411534
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
1153511535
integrity sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==
1153611536

11537+
logrocket@^3.0.1:
11538+
version "3.0.1"
11539+
resolved "https://registry.yarnpkg.com/logrocket/-/logrocket-3.0.1.tgz#c746e8df3d5fee999b152975e51db1908357a6f0"
11540+
integrity sha512-jOWG+jEzobKVxGytzZ+4KGm2kiMQMRTHab2uDWQyVZcHfEF38BlCH1yjQVY4LCmuQUwZitP9biMzJZnyUQ0dtQ==
11541+
1153711542
loose-envify@^1.4.0:
1153811543
version "1.4.0"
1153911544
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"

scripts/aws-initial-setup/initial-aws-setup.sh

+10
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ echo "VUE_APP_AWS_REGION=$aws_region" >> .env
147147
echo "VUE_APP_USER_POOL_ID=$user_pool_id" >> .env
148148
echo "VUE_APP_USER_POOL_CLIENT_ID=$user_pool_client_id" >> .env
149149

150+
# Add production flag for actual live deployments so LogRocket is enabled
151+
# (applies only to 'test' & 'live' system; building in production mode does
152+
# NOT imply a production system where we need the logger to be active)
153+
if [[ $mode == "live" ]] || [[ $mode == "test" ]]
154+
then
155+
echo "VUE_APP_PRODUCTION=true" >> .env
156+
else
157+
echo "VUE_APP_PRODUCTION=false" >> .env
158+
fi
159+
150160
# ==========================================
151161
# == Step 1: Parent DNS setup ==
152162
# == (Applies only in TEST and DEV mode) ==

yarn.lock

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
22
# yarn lockfile v1
33

4-

0 commit comments

Comments
 (0)