mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 20:07:56 +01:00
chore: removed sentry instrumentation dependencies
This commit is contained in:
@@ -43,9 +43,6 @@ NGINX_PORT=80
|
|||||||
# Debug value for api server use it as 0 for production use
|
# Debug value for api server use it as 0 for production use
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
CORS_ALLOWED_ORIGINS="http://localhost"
|
CORS_ALLOWED_ORIGINS="http://localhost"
|
||||||
# Error logs
|
|
||||||
SENTRY_DSN=""
|
|
||||||
SENTRY_ENVIRONMENT="development"
|
|
||||||
# Database Settings
|
# Database Settings
|
||||||
POSTGRES_USER="plane"
|
POSTGRES_USER="plane"
|
||||||
POSTGRES_PASSWORD="plane"
|
POSTGRES_PASSWORD="plane"
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
"@plane/utils": "*",
|
"@plane/utils": "*",
|
||||||
"@plane/services": "*",
|
"@plane/services": "*",
|
||||||
"@sentry/nextjs": "^8.54.0",
|
|
||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@types/lodash": "^4.17.0",
|
"@types/lodash": "^4.17.0",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
|
|||||||
@@ -145,11 +145,8 @@ RUN chmod +x /app/pg-setup.sh
|
|||||||
# APPLICATION ENVIRONMENT SETTINGS
|
# APPLICATION ENVIRONMENT SETTINGS
|
||||||
# *****************************************************************************
|
# *****************************************************************************
|
||||||
ENV APP_DOMAIN=localhost
|
ENV APP_DOMAIN=localhost
|
||||||
|
|
||||||
ENV WEB_URL=http://${APP_DOMAIN}
|
ENV WEB_URL=http://${APP_DOMAIN}
|
||||||
ENV DEBUG=0
|
ENV DEBUG=0
|
||||||
ENV SENTRY_DSN=
|
|
||||||
ENV SENTRY_ENVIRONMENT=production
|
|
||||||
ENV CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN},https://${APP_DOMAIN}
|
ENV CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN},https://${APP_DOMAIN}
|
||||||
# Secret Key
|
# Secret Key
|
||||||
ENV SECRET_KEY=60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5
|
ENV SECRET_KEY=60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
DEBUG=0
|
DEBUG=0
|
||||||
CORS_ALLOWED_ORIGINS="http://localhost"
|
CORS_ALLOWED_ORIGINS="http://localhost"
|
||||||
|
|
||||||
# Error logs
|
|
||||||
SENTRY_DSN=""
|
|
||||||
SENTRY_ENVIRONMENT="development"
|
|
||||||
|
|
||||||
# Database Settings
|
# Database Settings
|
||||||
POSTGRES_USER="plane"
|
POSTGRES_USER="plane"
|
||||||
POSTGRES_PASSWORD="plane"
|
POSTGRES_PASSWORD="plane"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from sentry_sdk import capture_exception
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
@@ -29,7 +28,6 @@ def create_issue_relation(apps, schema_editor):
|
|||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
capture_exception(e)
|
|
||||||
|
|
||||||
|
|
||||||
def update_issue_priority_choice(apps, schema_editor):
|
def update_issue_priority_choice(apps, schema_editor):
|
||||||
|
|||||||
@@ -7,13 +7,9 @@ from urllib.parse import urlparse
|
|||||||
|
|
||||||
# Third party imports
|
# Third party imports
|
||||||
import dj_database_url
|
import dj_database_url
|
||||||
import sentry_sdk
|
|
||||||
|
|
||||||
# Django imports
|
# Django imports
|
||||||
from django.core.management.utils import get_random_secret_key
|
from django.core.management.utils import get_random_secret_key
|
||||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
|
||||||
from sentry_sdk.integrations.django import DjangoIntegration
|
|
||||||
from sentry_sdk.integrations.redis import RedisIntegration
|
|
||||||
from corsheaders.defaults import default_headers
|
from corsheaders.defaults import default_headers
|
||||||
|
|
||||||
|
|
||||||
@@ -267,25 +263,6 @@ CELERY_IMPORTS = (
|
|||||||
"plane.bgtasks.issue_description_version_sync",
|
"plane.bgtasks.issue_description_version_sync",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Sentry Settings
|
|
||||||
# Enable Sentry Settings
|
|
||||||
if bool(os.environ.get("SENTRY_DSN", False)) and os.environ.get(
|
|
||||||
"SENTRY_DSN"
|
|
||||||
).startswith("https://"):
|
|
||||||
sentry_sdk.init(
|
|
||||||
dsn=os.environ.get("SENTRY_DSN", ""),
|
|
||||||
integrations=[
|
|
||||||
DjangoIntegration(),
|
|
||||||
RedisIntegration(),
|
|
||||||
CeleryIntegration(monitor_beat_tasks=True),
|
|
||||||
],
|
|
||||||
traces_sample_rate=1,
|
|
||||||
send_default_pii=True,
|
|
||||||
environment=os.environ.get("SENTRY_ENVIRONMENT", "development"),
|
|
||||||
profiles_sample_rate=float(os.environ.get("SENTRY_PROFILE_SAMPLE_RATE", 0)),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
FILE_SIZE_LIMIT = int(os.environ.get("FILE_SIZE_LIMIT", 5242880))
|
FILE_SIZE_LIMIT = int(os.environ.get("FILE_SIZE_LIMIT", 5242880))
|
||||||
|
|
||||||
# Unsplash Access key
|
# Unsplash Access key
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import traceback
|
|||||||
# Django imports
|
# Django imports
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
# Third party imports
|
|
||||||
from sentry_sdk import capture_exception
|
|
||||||
|
|
||||||
|
|
||||||
def log_exception(e):
|
def log_exception(e):
|
||||||
# Log the error
|
# Log the error
|
||||||
@@ -18,6 +15,4 @@ def log_exception(e):
|
|||||||
# Print the traceback if in debug mode
|
# Print the traceback if in debug mode
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
|
||||||
# Capture in sentry if configured
|
|
||||||
capture_exception(e)
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ faker==25.0.0
|
|||||||
django-filter==24.2
|
django-filter==24.2
|
||||||
# json model
|
# json model
|
||||||
jsonmodels==2.7.0
|
jsonmodels==2.7.0
|
||||||
# sentry
|
|
||||||
sentry-sdk==2.8.0
|
|
||||||
# storage
|
# storage
|
||||||
django-storages==1.14.2
|
django-storages==1.14.2
|
||||||
# user management
|
# user management
|
||||||
|
|||||||
18
app.json
18
app.json
@@ -6,16 +6,8 @@
|
|||||||
"website": "https://plane.so/",
|
"website": "https://plane.so/",
|
||||||
"success_url": "/",
|
"success_url": "/",
|
||||||
"stack": "heroku-22",
|
"stack": "heroku-22",
|
||||||
"keywords": [
|
"keywords": ["plane", "project management", "django", "next"],
|
||||||
"plane",
|
"addons": ["heroku-postgresql:mini", "heroku-redis:mini"],
|
||||||
"project management",
|
|
||||||
"django",
|
|
||||||
"next"
|
|
||||||
],
|
|
||||||
"addons": [
|
|
||||||
"heroku-postgresql:mini",
|
|
||||||
"heroku-redis:mini"
|
|
||||||
],
|
|
||||||
"buildpacks": [
|
"buildpacks": [
|
||||||
{
|
{
|
||||||
"url": "https://github.com/heroku/heroku-buildpack-python.git"
|
"url": "https://github.com/heroku/heroku-buildpack-python.git"
|
||||||
@@ -61,10 +53,6 @@
|
|||||||
"description": "AWS Bucket Name to use for S3",
|
"description": "AWS Bucket Name to use for S3",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"SENTRY_DSN": {
|
|
||||||
"description": "",
|
|
||||||
"value": ""
|
|
||||||
},
|
|
||||||
"WEB_URL": {
|
"WEB_URL": {
|
||||||
"description": "Web URL for Plane this will be used for redirections in the emails",
|
"description": "Web URL for Plane this will be used for redirections in the emails",
|
||||||
"value": ""
|
"value": ""
|
||||||
@@ -82,4 +70,4 @@
|
|||||||
"value": ""
|
"value": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ x-live-env: &live-env
|
|||||||
x-app-env: &app-env
|
x-app-env: &app-env
|
||||||
WEB_URL: ${WEB_URL:-http://localhost}
|
WEB_URL: ${WEB_URL:-http://localhost}
|
||||||
DEBUG: ${DEBUG:-0}
|
DEBUG: ${DEBUG:-0}
|
||||||
SENTRY_DSN: ${SENTRY_DSN}
|
|
||||||
SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT:-production}
|
|
||||||
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS}
|
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS}
|
||||||
GUNICORN_WORKERS: 1
|
GUNICORN_WORKERS: 1
|
||||||
USE_MINIO: ${USE_MINIO:-1}
|
USE_MINIO: ${USE_MINIO:-1}
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ LIVE_REPLICAS=1
|
|||||||
NGINX_PORT=80
|
NGINX_PORT=80
|
||||||
WEB_URL=http://${APP_DOMAIN}
|
WEB_URL=http://${APP_DOMAIN}
|
||||||
DEBUG=0
|
DEBUG=0
|
||||||
SENTRY_DSN=
|
|
||||||
SENTRY_ENVIRONMENT=production
|
|
||||||
CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN}
|
CORS_ALLOWED_ORIGINS=http://${APP_DOMAIN}
|
||||||
API_BASE_URL=http://api:8000
|
API_BASE_URL=http://api:8000
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,6 @@
|
|||||||
"@plane/constants": "*",
|
"@plane/constants": "*",
|
||||||
"@plane/editor": "*",
|
"@plane/editor": "*",
|
||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@sentry/node": "^9.0.1",
|
|
||||||
"@sentry/profiling-node": "^8.28.0",
|
|
||||||
"@tiptap/core": "2.10.4",
|
"@tiptap/core": "2.10.4",
|
||||||
"@tiptap/html": "2.11.0",
|
"@tiptap/html": "2.11.0",
|
||||||
"axios": "^1.8.3",
|
"axios": "^1.8.3",
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
import * as Sentry from "@sentry/node";
|
|
||||||
import { nodeProfilingIntegration } from "@sentry/profiling-node";
|
|
||||||
|
|
||||||
// Ensure to call this before importing any other modules!
|
|
||||||
Sentry.init({
|
|
||||||
dsn: process.env.LIVE_SENTRY_DSN,
|
|
||||||
environment: process.env.LIVE_SENTRY_ENVIRONMENT || "development",
|
|
||||||
|
|
||||||
integrations: [
|
|
||||||
// Add our Profiling integration
|
|
||||||
nodeProfilingIntegration(),
|
|
||||||
],
|
|
||||||
// Add Tracing by setting tracesSampleRate
|
|
||||||
// We recommend adjusting this value in production
|
|
||||||
tracesSampleRate: Number(process.env.LIVE_SENTRY_TRACES_SAMPLE_RATE) || 0.5,
|
|
||||||
// Set sampling rate for profiling
|
|
||||||
// This is relative to tracesSampleRate
|
|
||||||
profilesSampleRate: 1.0,
|
|
||||||
});
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
import * as Sentry from "@sentry/node";
|
|
||||||
import compression from "compression";
|
import compression from "compression";
|
||||||
import cors from "cors";
|
import cors from "cors";
|
||||||
import expressWs from "express-ws";
|
import expressWs from "express-ws";
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import helmet from "helmet";
|
import helmet from "helmet";
|
||||||
// config
|
|
||||||
import "@/core/config/sentry-config.js";
|
|
||||||
// hocuspocus server
|
// hocuspocus server
|
||||||
import { getHocusPocusServer } from "@/core/hocuspocus-server.js";
|
import { getHocusPocusServer } from "@/core/hocuspocus-server.js";
|
||||||
// helpers
|
// helpers
|
||||||
@@ -15,7 +12,7 @@ import { errorHandler } from "@/core/helpers/error-handler.js";
|
|||||||
// types
|
// types
|
||||||
import { TConvertDocumentRequestBody } from "@/core/types/common.js";
|
import { TConvertDocumentRequestBody } from "@/core/types/common.js";
|
||||||
|
|
||||||
const app = express();
|
const app: any = express();
|
||||||
expressWs(app);
|
expressWs(app);
|
||||||
|
|
||||||
app.set("port", process.env.PORT || 3000);
|
app.set("port", process.env.PORT || 3000);
|
||||||
@@ -92,8 +89,6 @@ app.use((_req, res) => {
|
|||||||
res.status(404).send("Not Found");
|
res.status(404).send("Not Found");
|
||||||
});
|
});
|
||||||
|
|
||||||
Sentry.setupExpressErrorHandler(app);
|
|
||||||
|
|
||||||
app.use(errorHandler);
|
app.use(errorHandler);
|
||||||
|
|
||||||
const liveServer = app.listen(app.get("port"), () => {
|
const liveServer = app.listen(app.get("port"), () => {
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
// Set `sourceRoot` to "/" to strip the build path prefix
|
|
||||||
// from generated source code references.
|
|
||||||
// This improves issue grouping in Sentry.
|
|
||||||
"sourceRoot": "/"
|
"sourceRoot": "/"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "tsup.config.ts"],
|
"include": ["src/**/*.ts", "tsup.config.ts"],
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
"@plane/types": "*",
|
"@plane/types": "*",
|
||||||
"@plane/ui": "*",
|
"@plane/ui": "*",
|
||||||
"@plane/services": "*",
|
"@plane/services": "*",
|
||||||
"@sentry/nextjs": "^8.54.0",
|
|
||||||
"axios": "^1.8.3",
|
"axios": "^1.8.3",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
|
|||||||
@@ -18,13 +18,7 @@
|
|||||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
"NEXT_PUBLIC_POSTHOG_KEY",
|
||||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
"NEXT_PUBLIC_POSTHOG_HOST",
|
||||||
"NEXT_PUBLIC_POSTHOG_DEBUG",
|
"NEXT_PUBLIC_POSTHOG_DEBUG",
|
||||||
"NEXT_PUBLIC_SUPPORT_EMAIL",
|
"NEXT_PUBLIC_SUPPORT_EMAIL"
|
||||||
"SENTRY_AUTH_TOKEN",
|
|
||||||
"SENTRY_ORG_ID",
|
|
||||||
"SENTRY_PROJECT_ID",
|
|
||||||
"NEXT_PUBLIC_SENTRY_ENVIRONMENT",
|
|
||||||
"NEXT_PUBLIC_SENTRY_DSN",
|
|
||||||
"SENTRY_MONITORING_ENABLED"
|
|
||||||
],
|
],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"build": {
|
"build": {
|
||||||
|
|||||||
Reference in New Issue
Block a user