Skip to content

Commit

Permalink
chore: added sentry (#507)
Browse files Browse the repository at this point in the history
* chore: added Sentry

* build: added SENTRY_DSN variable to envs

* build(updated sentry config): updated sentry config

* build(added config for sentry performance integrartion): added config for sentry

* chore: updated sentry config

* chore: restored deployment config

* test(theme): fixed loginModal component tests
  • Loading branch information
Frodigo authored Jan 28, 2022
1 parent c4e28d4 commit de3e8ff
Show file tree
Hide file tree
Showing 7 changed files with 26,978 additions and 20,275 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-vue-storefront-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
password: ${{ secrets.CLOUD_PASSWORD }}
dockerfile: .vuestorefrontcloud/docker/Dockerfile
buildoptions: --compress
buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,STORE_URL,MAGENTO_GRAPHQL,MAGENTO_EXTERNAL_CHECKOUT,MAGENTO_EXTERNAL_CHECKOUT_URL,MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,IMAGE_PROVIDER,IMAGE_PROVIDER_BASE_URL
buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,STORE_URL,MAGENTO_GRAPHQL,MAGENTO_EXTERNAL_CHECKOUT,MAGENTO_EXTERNAL_CHECKOUT_URL,MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,IMAGE_PROVIDER,IMAGE_PROVIDER_BASE_URL,SENTRY_DSN
env:
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_PASS: ${{ secrets.CLOUD_PASSWORD }}
Expand All @@ -38,6 +38,7 @@ jobs:
MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH: ${{ secrets.MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH }}
IMAGE_PROVIDER: ${{ secrets.IMAGE_PROVIDER }}
IMAGE_PROVIDER_BASE_URL: ${{ secrets.IMAGE_PROVIDER_BASE_URL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
deploy:
runs-on: ubuntu-latest
needs: build
Expand Down
2 changes: 2 additions & 0 deletions .vuestorefrontcloud/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG STORE_URL
ARG MAGENTO_BASE_URL
ARG IMAGE_PROVIDER
ARG IMAGE_PROVIDER_BASE_URL
ARG SENTRY_DSN

ENV MAGENTO_GRAPHQL=${MAGENTO_GRAPHQL}
ENV MAGENTO_EXTERNAL_CHECKOUT_URL=${MAGENTO_EXTERNAL_CHECKOUT_URL}
Expand All @@ -26,6 +27,7 @@ ENV NUXT_APP_PORT=3000
ENV MAGENTO_BASE_URL=https://magento2-instance.vuestorefront.io/
ENV IMAGE_PROVIDER=${IMAGE_PROVIDER}
ENV IMAGE_PROVIDER_BASE_URL=${IMAGE_PROVIDER_BASE_URL}
ENV SENTRY_DSN=${SENTRY_DSN}


RUN npm install -g npm-cli-login \
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
"engines": {
"node": ">=16.x"
}
}
}
3 changes: 3 additions & 0 deletions packages/theme/components/__tests__/LoginModal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jest.mock('~/composables/useUiState.ts', () => jest.fn());
jest.mock('@vue-storefront/magento', () => ({
useUser: jest.fn(),
useForgotPassword: jest.fn(),
useWishlist: jest.fn().mockReturnValue({
load: jest.fn(),
}),
}));

describe('<LoginModal/>', () => {
Expand Down
5 changes: 5 additions & 0 deletions packages/theme/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default {
'vue-scrollto/nuxt',
'@vue-storefront/middleware/nuxt',
'@nuxt/image',
'@nuxtjs/sentry',
// '@nuxtjs/recaptcha',
],
recaptcha: {
Expand Down Expand Up @@ -189,6 +190,10 @@ export default {
},
display: 'swap',
},
sentry: {
dsn: process.env.SENTRY_DSN,
tracing: true,
},
styleResources: {
scss: [require.resolve('@storefront-ui/shared/styles/_helpers.scss', { paths: [process.cwd()] })],
},
Expand Down
4 changes: 3 additions & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"@nuxtjs/google-fonts": "^1.3.0",
"@nuxtjs/pwa": "^3.3.5",
"@nuxtjs/recaptcha": "^1.0.4",
"@nuxtjs/sentry": "^5.1.6",
"@nuxtjs/style-resources": "^1.2.1",
"@sentry/tracing": "^6.17.2",
"@storefront-ui/vue": "^0.11.5",
"@vue-storefront/core": "~2.5.4",
"@vue-storefront/magento": "1.0.0-rc.5.3",
Expand Down Expand Up @@ -100,4 +102,4 @@
"engines": {
"node": ">=16.x"
}
}
}
47,234 changes: 26,962 additions & 20,272 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit de3e8ff

Please sign in to comment.