feat: logs only for backend
This commit is contained in:
parent
70ff3a5b30
commit
cb09a505d8
|
|
@ -1,5 +1,5 @@
|
|||
import { initializeSentry } from '@gitroom/nestjs-libraries/sentry/initialize.sentry';
|
||||
initializeSentry('backend');
|
||||
initializeSentry('backend', true);
|
||||
|
||||
import { loadSwagger } from '@gitroom/helpers/swagger/load.swagger';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// import { initializeSentry } from '@gitroom/nestjs-libraries/sentry/initialize.sentry';
|
||||
// initializeSentry('cron');
|
||||
import { initializeSentry } from '@gitroom/nestjs-libraries/sentry/initialize.sentry';
|
||||
initializeSentry('cron');
|
||||
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { CronModule } from './cron.module';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"incremental": true,
|
||||
"lib": ["es2020", "dom"],
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// import { initializeSentry } from '@gitroom/nestjs-libraries/sentry/initialize.sentry';
|
||||
// initializeSentry('workers');
|
||||
import { initializeSentry } from '@gitroom/nestjs-libraries/sentry/initialize.sentry';
|
||||
initializeSentry('workers');
|
||||
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import OpenAI from 'openai';
|
||||
import OpenAI from 'openai q';
|
||||
import { shuffle } from 'lodash';
|
||||
import { zodResponseFormat } from 'openai/helpers/zod';
|
||||
import { z } from 'zod';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as Sentry from '@sentry/nestjs';
|
|||
import { nodeProfilingIntegration } from '@sentry/profiling-node';
|
||||
import { capitalize } from 'lodash';
|
||||
|
||||
export const initializeSentry = (appName: string) => {
|
||||
export const initializeSentry = (appName: string, allowLogs = false) => {
|
||||
if (!process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ export const initializeSentry = (appName: string) => {
|
|||
integrations: [
|
||||
// Add our Profiling integration
|
||||
nodeProfilingIntegration(),
|
||||
Sentry.consoleLoggingIntegration({ levels: ['log', 'error', 'warn'] }),
|
||||
...allowLogs ? [Sentry.consoleLoggingIntegration({ levels: ['log', 'error', 'warn'] })] : [],
|
||||
],
|
||||
tracesSampleRate: process.env.NODE_ENV === 'development' ? 1.0 : 0.3,
|
||||
enableLogs: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue