Skip to content

Commit

Permalink
Add sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikmonsen committed May 6, 2024
1 parent 2d199ae commit 7031be4
Show file tree
Hide file tree
Showing 11 changed files with 680 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ jobs:
build-args: |
HTTP_PROXY=${{ secrets.HTTP_PROXY }}
HTTPS_PROXY=${{ secrets.HTTPS_PROXY }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }}
SENTRY_URL=${{ secrets.SENTRY_URL }}
deploy-to-stage:
name: Deploy stage environment
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ yarn-error.log*
next-env.d.ts

# IDE
/.idea
/.idea
# Sentry Config File
.sentryclirc
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ FROM base AS deps

ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG SENTRY_ORG
ARG SENTRY_PROJECT
ARG SENTRY_URL
ENV HTTP_PROXY=$HTTP_PROXY
ENV HTTPS_PROXY=$HTTPS_PROXY
ENV SENTRY_ORG=$SENTRY_ORG
ENV SENTRY_PROJECT=$SENTRY_PROJECT
ENV SENTRY_URL=$SENTRY_URL

RUN apk add --no-cache libc6-compat
WORKDIR /app
Expand Down
42 changes: 40 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
import {withSentryConfig} from "@sentry/nextjs";

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
basePath: "/hugin",
basePath: "/hugin"
};

export default nextConfig;
export default withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

// Suppresses source map uploading logs during build
silent: false,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
url: process.env.SENTRY_URL
}, {
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: true,

// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
});
Loading

0 comments on commit 7031be4

Please sign in to comment.