-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const SentryModule = require('../..') | ||
|
||
/** @type {import('@nuxt/types').NuxtConfig} */ | ||
const config = { | ||
rootDir: __dirname, | ||
telemetry: false, | ||
modules: [ | ||
/** @type {import('@nuxt/types').Module} */(/** @type {unknown} */(SentryModule)), | ||
], | ||
sentry: { | ||
dsn: 'https://[email protected]/1429779', | ||
clientIntegrations: { | ||
// Integration from @Sentry/browser package. | ||
TryCatch: { eventTarget: false }, | ||
Replay: {}, | ||
}, | ||
|
||
}, | ||
} | ||
|
||
module.exports = config |
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,36 @@ | ||
<template> | ||
<div> | ||
<h3>Server-side</h3> | ||
<span id="server-side">{{ serverSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span> | ||
<h3>Client-side</h3> | ||
<span id="client-side">{{ clientSentryPresent ? 'Works!' : '$sentry object is missing!' }}</span> | ||
<p> | ||
<button id="crash-button" @click="crash_me()"> | ||
crash me | ||
</button> | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
asyncData ({ $sentry }) { | ||
if (process.server) { | ||
return { | ||
serverSentryPresent: Boolean($sentry?.captureException), | ||
} | ||
} | ||
}, | ||
data () { | ||
return { | ||
clientSentryPresent: false, | ||
serverSentryPresent: false, | ||
} | ||
}, | ||
created () { | ||
if (process.client) { | ||
this.clientSentryPresent = Boolean(this.$sentry?.captureException) | ||
} | ||
}, | ||
} | ||
</script> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,22 +21,6 @@ const config: NuxtConfig = { | |
], | ||
sentry: { | ||
dsn: 'https://[email protected]/1429779', | ||
clientIntegrations: { | ||
// Integration from @Sentry/browser package. | ||
TryCatch: { eventTarget: false }, | ||
Replay: {}, | ||
}, | ||
clientConfig: { | ||
// This sets the sample rate to be 10%. You may want this to be 100% while | ||
// in development and sample at a lower rate in production | ||
replaysSessionSampleRate: 0.1, | ||
// If the entire session is not sampled, use the below sample rate to sample | ||
// sessions when an error occurs. | ||
replaysOnErrorSampleRate: 1.0, | ||
}, | ||
customClientIntegrations: '~/config/custom-client-integrations.ts', | ||
serverConfig: '~/config/server.config', | ||
tracing: true, | ||
}, | ||
typescript: { | ||
typeCheck: false, | ||
|