Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

add sentry configuration #133

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
push: true
build-args: |
NEXT_PUBLIC_TESTNET_GRAPHQL_URL=https://api-dev.whitewhale.money/graphql
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
- uses: actions/checkout@v2
with:
repository: 'White-Whale-Defi-Platform/tf-infra-dev-apps'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
push: true
build-args: |
NEXT_PUBLIC_TESTNET_GRAPHQL_URL=https://api.whitewhale.money/graphql
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
- uses: actions/checkout@v2
with:
repository: 'White-Whale-Defi-Platform/tf-infra-prod-apps'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: build and push
run: |
docker build -t 265389612123.dkr.ecr.eu-central-1.amazonaws.com/frontend:${{ github.sha }} .
docker build -t 265389612123.dkr.ecr.eu-central-1.amazonaws.com/frontend:${{ github.sha }} --build-arg SENTRY_DSN=${{ secrets.SENTRY_DSN }} .
- name: scan for vulnerabilities
uses: aquasecurity/trivy-action@master
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ yarn-debug.log*
yarn-error.log*

.vercel

# Sentry
.sentryclirc
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM node:16-alpine3.15 AS builder

ARG NEXT_PUBLIC_TESTNET_GRAPHQL_URL
ARG SENTRY_DSN

ENV NEXT_PUBLIC_TESTNET_GRAPHQL_URL ${NEXT_PUBLIC_TESTNET_GRAPHQL_URL}
ENV SENTRY_DSN ${SENTRY_DSN}

RUN apk add --no-cache libc6-compat python3 make gcc musl-dev g++

Expand Down
27 changes: 27 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

const { withSentryConfig } = require("@sentry/nextjs");

const moduleExports = {
// Your existing module.exports
};

const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore

silent: true, // Suppresses all logs
dryRun: true,
Comment on lines +19 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOu sure you want both silent and dryRun here ? This is a Sentry concept you know better than I

// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};

// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);
Loading