Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: logs

Nevo Davidf9ad6be60a21
diff --git a/apps/frontend/src/components/layout/sentry.component.tsx b/apps/frontend/src/components/layout/sentry.component.tsx
index 3f5b39948..3835f2675 100644
--- a/apps/frontend/src/components/layout/sentry.component.tsx
+++ b/apps/frontend/src/components/layout/sentry.component.tsx
@@ -9,14 +9,10 @@ export const SentryComponent: FC<{ children: ReactNode }> = ({ children }) => {
useEffect(() => {
if (!dsn) {
- return ;
+ return;
}
- try {
- initializeSentryClient(dsn);
- } catch (error) {
- console.error('[Sentry] Configuration error:', error);
- }
+ initializeSentryClient(dsn);
}, [dsn]);
// Always render children - don't block the app
diff --git a/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts b/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
index 0c5e7ffdd..aa34dd9e7 100644
--- a/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
+++ b/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
@@ -24,9 +24,10 @@ export const initializeSentry = (appName: string) => {
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
+ Sentry.consoleLoggingIntegration({ levels: ['log', 'error', 'warn'] }),
],
tracesSampleRate: process.env.NODE_ENV === 'development' ? 1.0 : 0.3,
- profilesSampleRate: process.env.NODE_ENV === 'development' ? 1.0 : 0.1,
+ enableLogs: true,
});
} catch (err) {}
return true;
diff --git a/libraries/react-shared-libraries/src/sentry/initialize.sentry.next.basic.ts b/libraries/react-shared-libraries/src/sentry/initialize.sentry.next.basic.ts
index 381210519..beb91f84c 100644
--- a/libraries/react-shared-libraries/src/sentry/initialize.sentry.next.basic.ts
+++ b/libraries/react-shared-libraries/src/sentry/initialize.sentry.next.basic.ts
@@ -5,24 +5,26 @@ export const initializeSentryBasic = (dsn: string, extension: any) => {
return;
}
- Sentry.init({
- initialScope: {
- tags: {
- service: 'frontend',
- component: 'nextjs',
- replaysEnabled: 'true',
- },
- contexts: {
- app: {
- name: 'Postiz Frontend',
- version: process.env.NEXT_PUBLIC_APP_VERSION || '0.0.0',
+ try {
+ Sentry.init({
+ initialScope: {
+ tags: {
+ service: 'frontend',
+ component: 'nextjs',
+ replaysEnabled: 'true',
+ },
+ contexts: {
+ app: {
+ name: 'Postiz Frontend',
+ version: process.env.NEXT_PUBLIC_APP_VERSION || '0.0.0',
+ },
},
},
- },
- dsn,
- sendDefaultPii: true,
- ...extension,
- debug: process.env.NODE_ENV === 'development',
- tracesSampleRate: process.env.NODE_ENV === 'development' ? 1.0 : 0.3,
- });
+ dsn,
+ sendDefaultPii: true,
+ ...extension,
+ debug: process.env.NODE_ENV === 'development',
+ tracesSampleRate: process.env.NODE_ENV === 'development' ? 1.0 : 0.3,
+ });
+ } catch (err) {}
};