I've wanted to use the Sentry logger but it can't find it.
I have this setup:
// instrument.ts
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: process.env.SENTRY_DSN,
// Tracing
tracesSampleRate: 1.0, // Capture 100% of the transactions
_experiments: { enableLogs: true },
});
// index.ts (for example)
import "./utils/instrument.js";
import * as Sentry from "@sentry/node";
const { logger } = Sentry;
Does Anybody else have this issue?
Sidenote: I've used @sentry/sveltekit before and it worked there. With @sentry/node it doesn't somehow.
Versions
@sentry/cli- 2.46.0@sentry/node- 8.55.0