Skip to content

Commit

Permalink
[#217]: ligretto frontend sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
Themezv committed Mar 31, 2024
1 parent bdf8d57 commit a203aea
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LIGRETTO_APP_ENV=production
19 changes: 19 additions & 0 deletions apps/ligretto-frontend/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/// <reference types="vite/client" />

export {}

declare global {
namespace NodeJS {
interface ProcessEnv {
LIGRETTO_CORE_URL: string
LIGRETTO_GAMEPLAY_URL: string
LIGRETTO_APP_ENV: string
LIGRETTO_APP_VERSION: string
LIGRETTO_FRONTEND_SENTRY_DSN: string
CAS_STATIC_URL: string
CAS_URL: string
AMPLITUDE_TOKEN?: string
CAS_PARTNER_ID: string
}
}
}
15 changes: 15 additions & 0 deletions apps/ligretto-frontend/src/app/sentry/initSentry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as Sentry from '@sentry/browser'
import { captureConsoleIntegration } from '@sentry/integrations'

import { SENTRY_DSN, SENTRY_ENV, IS_DEV_MODE, APP_VERSION } from '#shared/constants/config'

console.log(SENTRY_DSN, IS_DEV_MODE, SENTRY_ENV, APP_VERSION)

Sentry.init({
dsn: SENTRY_DSN,
maxBreadcrumbs: 50,
debug: IS_DEV_MODE,
environment: SENTRY_ENV,
release: APP_VERSION,
integrations: [captureConsoleIntegration({ levels: ['error', 'warn'] })],
})

0 comments on commit a203aea

Please sign in to comment.