Skip to content

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

feat: revert all the mod changes

Nevo David1aa47351a41b
diff --git a/apps/backend/src/api/routes/auth.controller.ts b/apps/backend/src/api/routes/auth.controller.ts
index 0d8a839ef..4f87d07d6 100644
--- a/apps/backend/src/api/routes/auth.controller.ts
+++ b/apps/backend/src/api/routes/auth.controller.ts
@@ -169,20 +169,10 @@ export class AuthController {
}
response.header('reload', 'true');
- try {
- Sentry.metrics.count('auth.login.success', 1, {
- attributes: { provider: body.provider || 'LOCAL' },
- } as any);
- } catch (e) {}
response.status(200).json({
login: true,
});
} catch (e: any) {
- try {
- Sentry.metrics.count('auth.login.failure', 1, {
- attributes: { provider: body?.provider || 'LOCAL' },
- } as any);
- } catch (er) {}
response.status(400).send(e.message);
}
}
@@ -270,9 +260,6 @@ export class AuthController {
const { jwt, token } = await this._authService.checkExists(provider, code);
if (token) {
- try {
- Sentry.metrics.count('oauth.connects', 1, { attributes: { provider } } as any);
- } catch (e) {}
return response.json({ token });
}
diff --git a/apps/backend/src/api/routes/media.controller.ts b/apps/backend/src/api/routes/media.controller.ts
index cdd751141..0da663168 100644
--- a/apps/backend/src/api/routes/media.controller.ts
+++ b/apps/backend/src/api/routes/media.controller.ts
@@ -25,7 +25,6 @@ import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory';
import { SaveMediaInformationDto } from '@gitroom/nestjs-libraries/dtos/media/save.media.information.dto';
import { VideoDto } from '@gitroom/nestjs-libraries/dtos/videos/video.dto';
import { VideoFunctionDto } from '@gitroom/nestjs-libraries/dtos/videos/video.function.dto';
-import * as Sentry from '@sentry/nestjs';
@ApiTags('Media')
@Controller('/media')
@@ -93,26 +92,13 @@ export class MediaController {
@UploadedFile() file: Express.Multer.File
) {
const originalName = file?.originalname || '';
- try {
- const uploadedFile = await this.storage.uploadFile(file);
-
- try {
- Sentry.metrics.count('uploads.total', 1);
- Sentry.metrics.distribution('upload_size_bytes', file?.size || 0);
- } catch (e) {}
-
- return this._mediaService.saveFile(
- org.id,
- uploadedFile.originalname,
- uploadedFile.path,
- originalName
- );
- } catch (err) {
- try {
- Sentry.metrics.count('uploads.failure', 1);
- } catch (e) {}
- throw err;
- }
+ const uploadedFile = await this.storage.uploadFile(file);
+ return this._mediaService.saveFile(
+ org.id,
+ uploadedFile.originalname,
+ uploadedFile.path,
+ originalName
+ );
}
@Post('/save-media')
@@ -149,31 +135,19 @@ export class MediaController {
@Body('preventSave') preventSave: string = 'false'
) {
const originalName = file.originalname;
- try {
- const getFile = await this.storage.uploadFile(file);
-
- try {
- Sentry.metrics.count('uploads.total', 1);
- Sentry.metrics.distribution('upload_size_bytes', file?.size || 0);
- } catch (e) {}
-
- if (preventSave === 'true') {
- const { path } = getFile;
- return { path };
- }
-
- return this._mediaService.saveFile(
- org.id,
- getFile.originalname,
- getFile.path,
- originalName
- );
- } catch (err) {
- try {
- Sentry.metrics.count('uploads.failure', 1);
- } catch (e) {}
- throw err;
+ const getFile = await this.storage.uploadFile(file);
+
+ if (preventSave === 'true') {
+ const { path } = getFile;
+ return { path };
}
+
+ return this._mediaService.saveFile(
+ org.id,
+ getFile.originalname,
+ getFile.path,
+ originalName
+ );
}
@Post('/:endpoint')
@@ -192,27 +166,15 @@ export class MediaController {
const name = upload.Location.split('/').pop();
const originalName = req.body?.file?.name;
- try {
- const saveFile = await this._mediaService.saveFile(
- org.id,
- name,
- // @ts-ignore
- upload.Location,
- originalName || undefined
- );
-
- try {
- Sentry.metrics.count('uploads.total', 1);
- Sentry.metrics.distribution('upload_size_bytes', (req.headers['content-length'] ? Number(req.headers['content-length']) : 0) || 0);
- } catch (e) {}
-
- res.status(200).json({ ...upload, saved: saveFile });
- } catch (err) {
- try {
- Sentry.metrics.count('uploads.failure', 1);
- } catch (e) {}
- throw err;
- }
+ const saveFile = await this._mediaService.saveFile(
+ org.id,
+ name,
+ // @ts-ignore
+ upload.Location,
+ originalName || undefined
+ );
+
+ res.status(200).json({ ...upload, saved: saveFile });
}
@Get('/')
diff --git a/apps/backend/src/api/routes/posts.controller.ts b/apps/backend/src/api/routes/posts.controller.ts
index a05cf7021..84b1b7486 100644
--- a/apps/backend/src/api/routes/posts.controller.ts
+++ b/apps/backend/src/api/routes/posts.controller.ts
@@ -16,7 +16,6 @@ import { GetPostsDto } from '@gitroom/nestjs-libraries/dtos/posts/get.posts.dto'
import { GetPostsListDto } from '@gitroom/nestjs-libraries/dtos/posts/get.posts.list.dto';
import { CheckPolicies } from '@gitroom/backend/services/auth/permissions/permissions.ability';
import { ApiTags } from '@nestjs/swagger';
-import * as Sentry from '@sentry/nestjs';
import { GeneratorDto } from '@gitroom/nestjs-libraries/dtos/generator/generator.dto';
import { CreateGeneratedPostsDto } from '@gitroom/nestjs-libraries/dtos/generator/create.generated.posts.dto';
import { AgentGraphService } from '@gitroom/nestjs-libraries/agent/agent.graph.service';
@@ -163,18 +162,7 @@ export class PostsController {
) {
console.log(JSON.stringify(rawBody, null, 2));
const body = await this._postsService.mapTypeToPost(rawBody, org.id);
- const created = await this._postsService.createPost(org.id, body);
-
- try {
- for (const p of body.posts || []) {
- const providerRaw = (p?.settings && p.settings.__type) || (p?.integration && p.integration.id) || '';
- const provider = (typeof providerRaw === 'string' ? providerRaw.split('-')[0] : '')
- .toLowerCase();
- Sentry.metrics.count('posts.created', 1, { attributes: { provider } } as any);
- }
- } catch (e) {}
-
- return created;
+ return this._postsService.createPost(org.id, body);
}
@Post('/generator/draft')
@@ -216,11 +204,7 @@ export class PostsController {
@Body('date') date: string,
@Body('action') action: 'schedule' | 'update' = 'schedule'
) {
- return (async () => {
- const res = await this._postsService.changeDate(org.id, id, date, action);
-
- return res;
- })();
+ return this._postsService.changeDate(org.id, id, date, action);
}
@Post('/separate-posts')
diff --git a/apps/frontend/src/components/launches/general.preview.component.tsx b/apps/frontend/src/components/launches/general.preview.component.tsx
index 5ce3ba3c4..6682b97c3 100644
--- a/apps/frontend/src/components/launches/general.preview.component.tsx
+++ b/apps/frontend/src/components/launches/general.preview.component.tsx
@@ -2,8 +2,7 @@ import { useIntegration } from '@gitroom/frontend/components/launches/helpers/us
import { useMediaDirectory } from '@gitroom/react/helpers/use.media.directory';
import clsx from 'clsx';
import { VideoOrImage } from '@gitroom/react/helpers/video.or.image';
-import { FC, useEffect } from 'react';
-import * as Sentry from '@sentry/nextjs';
+import { FC } from 'react';
import { textSlicer } from '@gitroom/helpers/utils/count.length';
import Image from 'next/image';
import { useLaunchStore } from '@gitroom/frontend/components/new-launch/store';
@@ -12,11 +11,6 @@ import { stripHtmlValidation } from '@gitroom/helpers/utils/strip.html.validatio
export const GeneralPreviewComponent: FC<{
maximumCharacters?: number;
}> = (props) => {
- useEffect(() => {
- try {
- Sentry.metrics.count('preview.render', 1);
- } catch (e) {}
- }, []);
const { value: topValue, integration } = useIntegration();
const current = useLaunchStore((state) => state.current);
const mediaDir = useMediaDirectory();
diff --git a/apps/frontend/src/components/new-launch/editor.tsx b/apps/frontend/src/components/new-launch/editor.tsx
index 84e427192..511f25d89 100644
--- a/apps/frontend/src/components/new-launch/editor.tsx
+++ b/apps/frontend/src/components/new-launch/editor.tsx
@@ -11,7 +11,6 @@ import React, {
forwardRef,
useImperativeHandle,
} from 'react';
-import * as Sentry from '@sentry/nextjs';
import clsx from 'clsx';
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
import EmojiPicker from 'emoji-picker-react';
@@ -184,12 +183,6 @@ export const EditorWrapper: FC<{
setLoaded(true);
}, [loaded, loadedState]);
- useEffect(() => {
- try {
- Sentry.metrics.count('editor.open', 1);
- } catch (e) {}
- }, []);
-
const canEdit = useMemo(() => {
return current === 'global' || !!internal;
}, [current, internal]);
diff --git a/apps/frontend/src/components/new-launch/manage.modal.tsx b/apps/frontend/src/components/new-launch/manage.modal.tsx
index 196e90add..243da51f2 100644
--- a/apps/frontend/src/components/new-launch/manage.modal.tsx
+++ b/apps/frontend/src/components/new-launch/manage.modal.tsx
@@ -33,7 +33,6 @@ import { SelectCustomer } from '@gitroom/frontend/components/launches/select.cus
import { CopilotPopup } from '@copilotkit/react-ui';
import { DummyCodeComponent } from '@gitroom/frontend/components/new-launch/dummy.code.component';
import { stripHtmlValidation } from '@gitroom/helpers/utils/strip.html.validation';
-import * as Sentry from '@sentry/nextjs';
import {
SettingsIcon,
ChevronDownIcon,
@@ -414,10 +413,6 @@ export const ManageModal: FC<AddEditModalProps> = (props) => {
}
if (!dummy) {
- try {
- Sentry.metrics.count('post.submit', 1, { attributes: { action: type } });
- } catch (e) {}
-
addEditSets
? addEditSets(data)
: await fetch('/posts', {
diff --git a/apps/orchestrator/src/activities/post.activity.ts b/apps/orchestrator/src/activities/post.activity.ts
index 2644946d3..5467d3530 100644
--- a/apps/orchestrator/src/activities/post.activity.ts
+++ b/apps/orchestrator/src/activities/post.activity.ts
@@ -23,7 +23,6 @@ import {
postId as postIdSearchParam,
} from '@gitroom/nestjs-libraries/temporal/temporal.search.attribute';
import { SubscriptionService } from '@gitroom/nestjs-libraries/database/prisma/subscriptions/subscription.service';
-import * as Sentry from '@sentry/nestjs';
@Injectable()
@Activity()
@@ -81,31 +80,7 @@ export class PostActivity {
@ActivityMethod()
async updatePost(id: string, postId: string, releaseURL: string) {
- const res = await this._postService.updatePost(id, postId, releaseURL);
- try {
- const posts = await this._postService.getPostByForWebhookId(postId);
- const post = Array.isArray(posts) && posts.length ? (posts[0] as any) : (posts as any);
- if (post && post.organizationId) {
- try {
- const running = this._temporalService.client
- .getRawClient()
- ?.workflow.list({ query: `organizationId="${post.organizationId}" AND ExecutionStatus="Running"` });
-
- let count = 0;
- if (running) {
- for await (const _ of running) {
- count++;
- }
- }
-
- try {
- Sentry.metrics.gauge('posts.queued', count, { attributes: { taskQueue: post.integration?.providerIdentifier?.split('-')[0] || 'main' } } as any);
- } catch (e) {}
- } catch (e) {}
- }
- } catch (e) {}
-
- return res;
+ return this._postService.updatePost(id, postId, releaseURL);
}
@ActivityMethod()
diff --git a/apps/sdk/src/index.ts b/apps/sdk/src/index.ts
index 1870e1439..d92d0d0ca 100644
--- a/apps/sdk/src/index.ts
+++ b/apps/sdk/src/index.ts
@@ -1,8 +1,6 @@
import { CreatePostDto } from '@gitroom/nestjs-libraries/dtos/posts/create.post.dto';
import { GetPostsDto } from '@gitroom/nestjs-libraries/dtos/posts/get.posts.dto';
import fetch, { FormData } from 'node-fetch';
-import * as Sentry from '@sentry/node';
-import crypto from 'crypto';
function toQueryString(obj: Record<string, any>): string {
const params = new URLSearchParams();
@@ -21,10 +19,6 @@ export default class Postiz {
) {}
async post(posts: CreatePostDto) {
- try {
- Sentry.metrics.count('sdk.requests', 1, { attributes: { method: 'post' } } as any);
- } catch (e) {}
-
return (
await fetch(`${this._path}/public/v1/posts`, {
method: 'POST',
@@ -38,10 +32,6 @@ export default class Postiz {
}
async postList(filters: GetPostsDto) {
- try {
- Sentry.metrics.count('sdk.requests', 1, { attributes: { method: 'list' } } as any);
- } catch (e) {}
-
return (
await fetch(`${this._path}/public/v1/posts?${toQueryString(filters)}`, {
method: 'GET',
@@ -54,10 +44,6 @@ export default class Postiz {
}
async upload(file: Buffer, extension: string) {
- try {
- Sentry.metrics.count('sdk.requests', 1, { attributes: { method: 'upload' } } as any);
- } catch (e) {}
-
const formData = new FormData();
const type =
extension === 'png'
@@ -86,10 +72,6 @@ export default class Postiz {
}
async integrations() {
- try {
- Sentry.metrics.count('sdk.requests', 1, { attributes: { method: 'integrations' } } as any);
- } catch (e) {}
-
return (
await fetch(`${this._path}/public/v1/integrations`, {
method: 'GET',
@@ -102,10 +84,6 @@ export default class Postiz {
}
deletePost(id: string) {
- try {
- Sentry.metrics.count('sdk.requests', 1, { attributes: { method: 'delete' } } as any);
- } catch (e) {}
-
return fetch(`${this._path}/public/v1/posts/${id}`, {
method: 'DELETE',
headers: {
diff --git a/libraries/nestjs-libraries/src/database/prisma/media/media.service.ts b/libraries/nestjs-libraries/src/database/prisma/media/media.service.ts
index c7a06da63..66bdac84a 100644
--- a/libraries/nestjs-libraries/src/database/prisma/media/media.service.ts
+++ b/libraries/nestjs-libraries/src/database/prisma/media/media.service.ts
@@ -7,7 +7,6 @@ import { SaveMediaInformationDto } from '@gitroom/nestjs-libraries/dtos/media/sa
import { VideoManager } from '@gitroom/nestjs-libraries/videos/video.manager';
import { VideoDto } from '@gitroom/nestjs-libraries/dtos/videos/video.dto';
import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory';
-import * as Sentry from '@sentry/nestjs';
import {
AuthorizationActions,
Sections,
@@ -42,31 +41,11 @@ export class MediaService {
org,
'ai_images',
async () => {
- const start = Date.now();
- try {
- try {
- Sentry.metrics.count('media.generate_attempt', 1, { attributes: { media_type: 'image' } } as any);
- } catch (e) {}
-
- if (generatePromptFirst) {
- prompt = await this._openAi.generatePromptForPicture(prompt);
- console.log('Prompt:', prompt);
- }
-
- const res = await this._openAi.generateImage(prompt, !!generatePromptFirst);
-
- try {
- Sentry.metrics.count('media.generate_success', 1, { attributes: { media_type: 'image' } } as any);
- Sentry.metrics.distribution('media.generation_ms', Date.now() - start, { attributes: { media_type: 'image' } } as any);
- } catch (e) {}
-
- return res;
- } catch (err) {
- try {
- Sentry.metrics.count('media.generate_failure', 1, { attributes: { media_type: 'image' } } as any);
- } catch (e) {}
- throw err;
+ if (generatePromptFirst) {
+ prompt = await this._openAi.generatePromptForPicture(prompt);
+ console.log('Prompt:', prompt);
}
+ return this._openAi.generateImage(prompt, !!generatePromptFirst);
}
);
@@ -126,39 +105,21 @@ export class MediaService {
console.log(body.customParams);
await video.instance.processAndValidate(body.customParams);
+ console.log('no err');
- const start = Date.now();
- try {
- try {
- Sentry.metrics.count('media.generate_attempt', 1, { attributes: { media_type: 'video' } } as any);
- } catch (e) {}
-
- const result = await this._subscriptionService.useCredit(
- org,
- 'ai_videos',
- async () => {
- const loadedData = await video.instance.process(
- body.output,
- body.customParams
- );
-
- const file = await this.storage.uploadSimple(loadedData);
- return this.saveFile(org.id, file.split('/').pop(), file);
- }
- );
+ return await this._subscriptionService.useCredit(
+ org,
+ 'ai_videos',
+ async () => {
+ const loadedData = await video.instance.process(
+ body.output,
+ body.customParams
+ );
- try {
- Sentry.metrics.count('media.generate_success', 1, { attributes: { media_type: 'video' } } as any);
- Sentry.metrics.distribution('media.generation_ms', Date.now() - start, { attributes: { media_type: 'video' } } as any);
- } catch (e) {}
-
- return result;
- } catch (err) {
- try {
- Sentry.metrics.count('media.generate_failure', 1, { attributes: { media_type: 'video' } } as any);
- } catch (e) {}
- throw err;
- }
+ const file = await this.storage.uploadSimple(loadedData);
+ return this.saveFile(org.id, file.split('/').pop(), file);
+ }
+ );
}
async videoFunction(identifier: string, functionName: string, body: any) {
diff --git a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
index 4be7c3d50..54d723551 100644
--- a/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
+++ b/libraries/nestjs-libraries/src/database/prisma/posts/posts.service.ts
@@ -681,25 +681,6 @@ export class PostsService {
},
]),
});
- // update queued-per-org gauge (simple approach: count running workflows for org)
- try {
- const running = this._temporalService.client
- .getRawClient()
- ?.workflow.list({
- query: `organizationId="${orgId}" AND ExecutionStatus="Running"`,
- });
-
- let count = 0;
- if (running) {
- for await (const _ of running) {
- count++;
- }
- }
-
- try {
- Sentry.metrics.gauge('posts.queued', count, { attributes: { taskQueue } } as any);
- } catch (err) {}
- } catch (err) {}
} catch (err) {}
}
@@ -738,7 +719,7 @@ export class PostsService {
).catch((err) => {});
}
- // metric moved: controller records `posts.created` with org/provider tags
+ Sentry.metrics.count('post_created', 1);
postList.push({
postId: posts[0].id,
integration: post.integration.id,
diff --git a/libraries/nestjs-libraries/src/integrations/refresh.integration.service.ts b/libraries/nestjs-libraries/src/integrations/refresh.integration.service.ts
index 050885a1a..a14d990b4 100644
--- a/libraries/nestjs-libraries/src/integrations/refresh.integration.service.ts
+++ b/libraries/nestjs-libraries/src/integrations/refresh.integration.service.ts
@@ -7,7 +7,6 @@ import {
SocialProvider,
} from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
import { TemporalService } from 'nestjs-temporal-core';
-import * as Sentry from '@sentry/nestjs';
@Injectable()
export class RefreshIntegrationService {
@@ -72,61 +71,45 @@ export class RefreshIntegrationService {
integration: Integration,
socialProvider: SocialProvider
): Promise<AuthTokenDetails | false> {
- try {
- try {
- Sentry.metrics.count('provider.refresh_attempt', 1, { attributes: { provider: socialProvider.identifier } } as any);
- } catch (e) {}
-
- const refresh: false | AuthTokenDetails = await socialProvider
- .refreshToken(integration.refreshToken)
- .catch((err) => false);
-
- if (!refresh || !refresh.accessToken) {
- try {
- Sentry.metrics.count('provider.refresh_fail', 1, { attributes: { provider: socialProvider.identifier } } as any);
- } catch (e) {}
-
- await this._integrationService.refreshNeeded(
- integration.organizationId,
- integration.id
- );
-
- await this._integrationService.informAboutRefreshError(
- integration.organizationId,
- integration
- );
-
- await this._integrationService.disconnectChannel(
- integration.organizationId,
- integration
- );
-
- return false;
- }
-
- // proceed with reconnect handling below
- if (
- !socialProvider.reConnect ||
- integration.rootInternalId === integration.internalId
- ) {
- return refresh;
- }
-
- const reConnect = await socialProvider.reConnect(
- integration.rootInternalId,
- integration.internalId,
- refresh.accessToken
+ const refresh: false | AuthTokenDetails = await socialProvider
+ .refreshToken(integration.refreshToken)
+ .catch((err) => false);
+
+ if (!refresh || !refresh.accessToken) {
+ await this._integrationService.refreshNeeded(
+ integration.organizationId,
+ integration.id
+ );
+
+ await this._integrationService.informAboutRefreshError(
+ integration.organizationId,
+ integration
+ );
+
+ await this._integrationService.disconnectChannel(
+ integration.organizationId,
+ integration
);
- return {
- ...refresh,
- ...reConnect,
- };
- } catch (err) {
- try {
- Sentry.metrics.count('provider.refresh_fail', 1, { attributes: { provider: socialProvider.identifier } } as any);
- } catch (e) {}
return false;
}
+
+ if (
+ !socialProvider.reConnect ||
+ integration.rootInternalId === integration.internalId
+ ) {
+ return refresh;
+ }
+
+ const reConnect = await socialProvider.reConnect(
+ integration.rootInternalId,
+ integration.internalId,
+ refresh.accessToken
+ );
+
+ return {
+ ...refresh,
+ ...reConnect,
+ };
}
}
diff --git a/libraries/nestjs-libraries/src/integrations/social.abstract.ts b/libraries/nestjs-libraries/src/integrations/social.abstract.ts
index 0e6af5931..ec13f7f65 100644
--- a/libraries/nestjs-libraries/src/integrations/social.abstract.ts
+++ b/libraries/nestjs-libraries/src/integrations/social.abstract.ts
@@ -1,7 +1,6 @@
import { timer } from '@gitroom/helpers/utils/timer';
import { Integration } from '@prisma/client';
import { ApplicationFailure } from '@temporalio/activity';
-import * as Sentry from '@sentry/nestjs';
export class RefreshToken extends ApplicationFailure {
constructor(identifier: string, json: string, body: BodyInit, message = '') {
@@ -105,24 +104,10 @@ export abstract class SocialAbstract {
totalRetries = 0,
ignoreConcurrency = false
): Promise<Response> {
- const start = Date.now();
- let request: Response;
- try {
- request = await fetch(url, options);
- const latency = Date.now() - start;
- try {
- Sentry.metrics.distribution('provider.api_latency_ms', latency, { attributes: { provider: this.identifier, endpoint: url, status: 'success' } } as any);
- } catch (e) {}
-
- if (request.status === 200 || request.status === 201) {
- return request;
- }
- } catch (err) {
- const latency = Date.now() - start;
- try {
- Sentry.metrics.distribution('provider.api_latency_ms', latency, { attributes: { provider: this.identifier, endpoint: url, status: 'failure' } } as any);
- } catch (e) {}
- throw err;
+ const request = await fetch(url, options);
+
+ if (request.status === 200 || request.status === 201) {
+ return request;
}
if (totalRetries > 2) {
@@ -144,9 +129,6 @@ export abstract class SocialAbstract {
json.includes('rate_limit_exceeded') ||
json.includes('Rate limit')
) {
- try {
- Sentry.metrics.count('provider.rate_limited', 1, { attributes: { provider: this.identifier } } as any);
- } catch (e) {}
await timer(5000);
return this.fetch(
url,
diff --git a/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts b/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
index 41948fd84..b92c6627b 100644
--- a/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
+++ b/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
@@ -31,10 +31,6 @@ export const initializeSentry = (appName: string, allowLogs = false) => {
recordInputs: true,
recordOutputs: true,
}),
- Sentry.langChainIntegration({
- recordInputs: true,
- recordOutputs: true,
- }),
],
tracesSampleRate: 1.0,
enableLogs: true,
@@ -46,18 +42,5 @@ export const initializeSentry = (appName: string, allowLogs = false) => {
} catch (err) {
console.log(err);
}
- try {
- process.on('unhandledRejection', (reason) => {
- try {
- Sentry.metrics.count('app.unhandled_errors', 1, { attributes: { service: appName, route: 'unhandledRejection' } } as any);
- } catch (e) {}
- });
-
- process.on('uncaughtException', (err) => {
- try {
- Sentry.metrics.count('app.unhandled_errors', 1, { attributes: { service: appName, route: 'uncaughtException' } } as any);
- } catch (e) {}
- });
- } catch (e) {}
return true;
};
diff --git a/package.json b/package.json
index 4fa43cf33..37eb1a957 100644
--- a/package.json
+++ b/package.json
@@ -80,10 +80,10 @@
"@pigment-css/react": "^0.0.30",
"@postiz/wallets": "^0.0.1",
"@prisma/client": "6.5.0",
- "@sentry/nestjs": "^10.45.0",
- "@sentry/nextjs": "^10.45.0",
- "@sentry/profiling-node": "^10.45.0",
- "@sentry/react": "^10.45.0",
+ "@sentry/nestjs": "^10.26.0",
+ "@sentry/nextjs": "^10.26.0",
+ "@sentry/profiling-node": "^10.25.0",
+ "@sentry/react": "^10.25.0",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.35",
"@stripe/react-stripe-js": "^5.4.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f676dfde4..f56b3fb58 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -127,16 +127,16 @@ importers:
specifier: 6.5.0
'@sentry/nestjs':
- specifier: ^10.45.0
+ specifier: ^10.26.0
'@sentry/nextjs':
- specifier: ^10.45.0
+ specifier: ^10.26.0
'@sentry/profiling-node':
- specifier: ^10.45.0
+ specifier: ^10.25.0
version: 10.45.0
'@sentry/react':
- specifier: ^10.45.0
+ specifier: ^10.25.0
version: 10.45.0([email protected])
'@solana/wallet-adapter-react':
specifier: ^0.15.35
@@ -26315,7 +26315,7 @@ snapshots:
dependencies:
- '@types/pg': 8.15.5
+ '@types/pg': 8.15.6
dependencies: