File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup>
22/** Vendor */
3+ import * as Sentry from " @sentry/nuxt" ;
34import { DateTime } from " luxon"
45
56/** UI */
@@ -344,6 +345,9 @@ const handleViewRawTransactions = () => {
344345 modalsStore .open (" rawData" )
345346}
346347
348+ function name123 () {
349+ Sentry .captureException (new Error (" Test Sentry direct capture" ));
350+ }
347351function triggerClientError () {
348352 throw new Error (" Nuxt Button Error" )
349353}
@@ -361,7 +365,8 @@ function triggerClientError() {
361365 < / Flex>
362366
363367 < Flex align= " center" gap= " 8" >
364- < Button @click= " router.push(`/block/${height - 1}`)" type= " secondary" size= " mini" : disabled= " height === 0" >
368+ <!-- < Button @click= " router.push(`/block/${height - 1}`)" type= " secondary" size= " mini" : disabled= " height === 0" > -->
369+ < Button @click= " name123" type= " secondary" size= " mini" : disabled= " height === 0" >
365370 < Icon name= " arrow-redo-right" size= " 16" color= " secondary" : style= " { transform: 'scaleX(-1)' }" / >
366371 < Text : class = " $style.block_nav__txt" > Prev< / Text >
367372 < / Button>
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ export default defineNuxtConfig({
7676 version : "1.20.0" ,
7777
7878 sentry : {
79- dsn : process . env . SENTRY_DSN || "" ,
79+ dsn : process . env . SENTRY_DSN ,
8080 } ,
8181
8282 API_MAINNET : "" ,
Original file line number Diff line number Diff line change 2121
2222import * as Sentry from "@sentry/nuxt" ;
2323
24- export default defineNuxtPlugin ( ( ) => {
25- const config = useRuntimeConfig ( ) ;
26- const sentryConfig = ( config . public . sentry as { dsn : string } ) ;
27-
28- Sentry . init ( {
29- dsn : sentryConfig . dsn ,
30-
31- sendDefaultPii : true ,
32-
33- integrations : [
34- Sentry . replayIntegration ( ) ,
35- Sentry . feedbackIntegration ( {
36- colorScheme : "system" ,
37- } ) ,
38- ] ,
39-
40- tracesSampleRate : 1.0 ,
41- replaysSessionSampleRate : 0.1 ,
42- replaysOnErrorSampleRate : 1.0 ,
43- enableLogs : true ,
44- } ) ;
24+ const config = useRuntimeConfig ( ) ;
25+ const sentryConfig = ( config . public . sentry as { dsn : string } ) ;
26+
27+ console . log ( "[SENTRY DSN CLIENT]" , sentryConfig . dsn ) ;
28+
29+ Sentry . init ( {
30+ dsn : sentryConfig . dsn ,
31+
32+ sendDefaultPii : true ,
33+
34+ integrations : [
35+ Sentry . replayIntegration ( ) ,
36+ Sentry . feedbackIntegration ( {
37+ colorScheme : "system" ,
38+ } ) ,
39+ ] ,
40+
41+ tracesSampleRate : 1.0 ,
42+ replaysSessionSampleRate : 0.1 ,
43+ replaysOnErrorSampleRate : 1.0 ,
44+ enableLogs : true ,
4545} ) ;
Original file line number Diff line number Diff line change 1010
1111import * as Sentry from "@sentry/nuxt" ;
1212
13- export default defineNuxtPlugin ( ( ) => {
14- const config = useRuntimeConfig ( ) ;
15- const sentryConfig = config . public . sentry as { dsn : string } ;
13+ const config = useRuntimeConfig ( ) ;
14+ const sentryConfig = config . public . sentry as { dsn : string } ;
1615
17- Sentry . init ( {
18- dsn : sentryConfig . dsn ,
19- tracesSampleRate : 1.0 ,
20- enableLogs : true ,
21- } ) ;
16+ console . log ( "[SENTRY DSN SERVER]" , sentryConfig . dsn ) ;
17+
18+ Sentry . init ( {
19+ dsn : sentryConfig . dsn ,
20+ tracesSampleRate : 1.0 ,
21+ enableLogs : true ,
2222} ) ;
Original file line number Diff line number Diff line change 1+ export default defineEventHandler ( ( event ) => {
2+ const config = useRuntimeConfig ( event ) ;
3+ return { sentryDsn : config . public . sentry ?. dsn || null } ;
4+ } ) ;
You can’t perform that action at this time.
0 commit comments