mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +00:00
* wip on refactoring docs * wip * initial structured logs impl * structured log docs * create logger package * add news entry for structured logging * add logger package to dockerfile and cleanup * add gh workflow for catching broken links * further wip * fix * further wip on docs * review feedback * remove logger dep from mcp package * fix build errors * add back auth_url warning * fix sidebar title consistency --------- Co-authored-by: bkellam <bshizzle1234@gmail.com>
15 lines
494 B
TypeScript
15 lines
494 B
TypeScript
import * as Sentry from "@sentry/node";
|
|
import { env } from "./env.js";
|
|
import { createLogger } from "@sourcebot/logger";
|
|
|
|
const logger = createLogger('instrument');
|
|
|
|
if (!!env.NEXT_PUBLIC_SENTRY_BACKEND_DSN && !!env.NEXT_PUBLIC_SENTRY_ENVIRONMENT) {
|
|
Sentry.init({
|
|
dsn: env.NEXT_PUBLIC_SENTRY_BACKEND_DSN,
|
|
release: env.NEXT_PUBLIC_SOURCEBOT_VERSION,
|
|
environment: env.NEXT_PUBLIC_SENTRY_ENVIRONMENT,
|
|
});
|
|
} else {
|
|
logger.debug("Sentry was not initialized");
|
|
}
|