Skip to content

Commit

Permalink
Use unstable_sentryBundlerPluginOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Dec 17, 2024
1 parent 877d5fa commit 40d1439
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ ENV NODE_ENV=production
ENV NODE_OPTIONS="--max_old_space_size=4096"
ENV SEMANTIC_VERSION=${SEMANTIC_VERSION}

RUN printenv

RUN --mount=type=secret,id=sentry_auth_token \
sh -c "export SENTRY_AUTH_TOKEN=$(cat /run/secrets/sentry_auth_token) && pnpm build"

Expand Down
5 changes: 5 additions & 0 deletions frontend/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ export default defineNuxtConfig({
org: "openverse",
project: "openverse-frontend",
},
unstable_sentryBundlerPluginOptions: {
release: {
name: import.meta.env.SEMANTIC_VERSION,
},
},
},
sourcemap: {
client: "hidden",
Expand Down
7 changes: 7 additions & 0 deletions frontend/sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import dotenv from "dotenv"
// @see the section on server setup: https://nuxt.com/modules/sentry
dotenv.config()

console.log(
"Will initialize Sentry with dsn",
process.env.NUXT_PUBLIC_SENTRY_DSN
)
console.log("environment", process.env.NUXT_PUBLIC_SENTRY_ENVIRONMENT)
console.log("release", process.env.SEMANTIC_VERSION)

Sentry.init({
dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
environment: process.env.NUXT_PUBLIC_SENTRY_ENVIRONMENT,
Expand Down

0 comments on commit 40d1439

Please sign in to comment.