Skip to content

Commit

Permalink
feat: integrate with Sentry (TT-1579) (#7)
Browse files Browse the repository at this point in the history
Har ikke lagt inn Auth-token env siden denne er koblet på brukernivå.
Dette brukes for opplasting av sourcemaps og er ikke kritisk for å kunne
dra nytte av Sentry. Høres ut som vi uansett har behov for oppdatering
av Sentry for å lettere kunne laste opp sourcemaps.
  • Loading branch information
fredrikmonsen authored May 8, 2024
1 parent 2d199ae commit 0fd4b21
Show file tree
Hide file tree
Showing 10 changed files with 659 additions and 37 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ jobs:
build-args: |
HTTP_PROXY=${{ secrets.HTTP_PROXY }}
HTTPS_PROXY=${{ secrets.HTTPS_PROXY }}
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ FROM base AS deps

ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG SENTRY_DSN
ARG SENTRY_ORG
ARG SENTRY_PROJECT
ARG SENTRY_URL

ENV HTTP_PROXY=$HTTP_PROXY
ENV HTTPS_PROXY=$HTTPS_PROXY
ENV SENTRY_DSN=$SENTRY_DSN
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
17 changes: 16 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import {withSentryConfig} from "@sentry/nextjs";
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
basePath: "/hugin",
};

export default nextConfig;
export default withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
silent: true,
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/
widenClientFileUpload: true,
transpileClientSDK: true,
hideSourceMaps: true,
disableLogger: true
});
Loading

0 comments on commit 0fd4b21

Please sign in to comment.