-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Sentry Nuxt module * Correctly call Sentry captureException in the app * Fix unit tests * Fix VR tests * Add Sentry auth token for releases and sourcemaps * Dotenv is already installed by Nuxt
- Loading branch information
Showing
20 changed files
with
1,196 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useAppConfig, useRuntimeConfig } from "#imports" | ||
|
||
import * as Sentry from "@sentry/nuxt" | ||
|
||
Sentry.init({ | ||
dsn: useRuntimeConfig().public.sentry.dsn, | ||
environment: useRuntimeConfig().public.sentry.environment, | ||
release: useAppConfig().semanticVersion, | ||
ignoreErrors: [ | ||
// Can be safely ignored, @see https://github.com/WICG/resize-observer/issues/38 | ||
/ResizeObserver loop limit exceeded/i, | ||
], | ||
|
||
tracesSampleRate: 1.0, | ||
}) | ||
Sentry.setContext("render context", { platform: "client" }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as Sentry from "@sentry/nuxt" | ||
import dotenv from "dotenv" | ||
|
||
// Necessary for loading environment variables before Nuxt is loaded | ||
// @see the section on server setup: https://nuxt.com/modules/sentry | ||
dotenv.config() | ||
|
||
Sentry.init({ | ||
dsn: process.env.NUXT_PUBLIC_SENTRY_DSN, | ||
environment: process.env.NUXT_PUBLIC_SENTRY_ENVIRONMENT, | ||
release: process.env.SEMANTIC_VERSION, | ||
|
||
tracesSampleRate: 1.0, | ||
}) | ||
Sentry.setContext("render context", { platform: "server" }) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,13 @@ | ||
import { defineNuxtPlugin, useRuntimeConfig, useAppConfig } from "#imports" | ||
import { defineNuxtPlugin } from "#imports" | ||
|
||
import * as Sentry from "@sentry/vue" | ||
|
||
export default defineNuxtPlugin((nuxtApp) => { | ||
const { | ||
public: { sentry }, | ||
} = useRuntimeConfig() | ||
|
||
const { semanticVersion } = useAppConfig() | ||
|
||
if (!sentry.dsn) { | ||
console.warn("Sentry DSN wasn't provided") | ||
} | ||
|
||
Sentry.init({ | ||
dsn: sentry.dsn, | ||
environment: sentry.environment, | ||
release: semanticVersion, | ||
app: nuxtApp.vueApp, | ||
ignoreErrors: [ | ||
// Can be safely ignored, @see https://github.com/WICG/resize-observer/issues/38 | ||
/ResizeObserver loop limit exceeded/i, | ||
], | ||
}) | ||
Sentry.setContext("render context", { platform: "client" }) | ||
import * as Sentry from "@sentry/nuxt" | ||
|
||
export default defineNuxtPlugin(() => { | ||
const { captureException, captureMessage } = Sentry | ||
return { | ||
provide: { | ||
sentry: Sentry, | ||
captureException, | ||
captureMessage, | ||
}, | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.