avem
avem4w ago

Deno <> Sentry | captureConsoleIntegration and captureException not working?

Seems like captureConsoleIntegration and captureException are not working in Deno?
import Env from '@/env.ts';
import * as Sentry from "@sentry/deno";

if (Env.SENTRY_DSN) {
Sentry.init({
dsn: Env.SENTRY_DSN,

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
integrations: [
Sentry.denoCronIntegration(),
Sentry.captureConsoleIntegration({levels: ['error']})
],
});
}

console.error("hahaha")
// throw new Error('test 1')
try {
throw Error("test 2")
} catch (error) {
Sentry.captureException(error)
}
import Env from '@/env.ts';
import * as Sentry from "@sentry/deno";

if (Env.SENTRY_DSN) {
Sentry.init({
dsn: Env.SENTRY_DSN,

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
integrations: [
Sentry.denoCronIntegration(),
Sentry.captureConsoleIntegration({levels: ['error']})
],
});
}

console.error("hahaha")
// throw new Error('test 1')
try {
throw Error("test 2")
} catch (error) {
Sentry.captureException(error)
}
2 Replies
avem
avemOP4w ago
import { captureConsoleIntegration } from 'https://deno.land/x/sentry@8.8.0/index.mjs'

const denoCaptureConsole = captureConsoleIntegration()
denoCaptureConsole.name += '-deno'
import { captureConsoleIntegration } from 'https://deno.land/x/sentry@8.8.0/index.mjs'

const denoCaptureConsole = captureConsoleIntegration()
denoCaptureConsole.name += '-deno'