fix: remove localdb tracing
This commit is contained in:
parent
be9dbc1b18
commit
4652ad0fc3
3 changed files with 7 additions and 50 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { getActiveSpan, startSpan } from "@sentry/nextjs";
|
||||
import * as Comlink from "comlink";
|
||||
import set from "lodash/set";
|
||||
// plane
|
||||
|
|
@ -77,7 +76,7 @@ export class Storage {
|
|||
}
|
||||
|
||||
try {
|
||||
await startSpan({ name: "INIT_DB" }, async () => await this._initialize(workspaceSlug));
|
||||
await this._initialize(workspaceSlug);
|
||||
return true;
|
||||
} catch (err) {
|
||||
logError(err);
|
||||
|
|
@ -139,11 +138,9 @@ export class Storage {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
await startSpan({ name: "LOAD_WS", attributes: { slug: this.workspaceSlug } }, async () => {
|
||||
this.setOption("sync_workspace", new Date().toUTCString());
|
||||
await loadWorkSpaceData(this.workspaceSlug);
|
||||
this.deleteOption("sync_workspace");
|
||||
});
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
this.deleteOption("sync_workspace");
|
||||
|
|
@ -177,7 +174,7 @@ export class Storage {
|
|||
return false;
|
||||
}
|
||||
try {
|
||||
const sync = startSpan({ name: `SYNC_ISSUES` }, () => this._syncIssues(projectId));
|
||||
const sync = this._syncIssues(projectId);
|
||||
this.setSync(projectId, sync);
|
||||
await sync;
|
||||
} catch (e) {
|
||||
|
|
@ -187,8 +184,6 @@ export class Storage {
|
|||
};
|
||||
|
||||
_syncIssues = async (projectId: string) => {
|
||||
const activeSpan = getActiveSpan();
|
||||
|
||||
log("### Sync started");
|
||||
let status = this.getStatus(projectId);
|
||||
if (status === "loading" || status === "syncing") {
|
||||
|
|
@ -248,11 +243,6 @@ export class Storage {
|
|||
this.setOption(projectId, "ready");
|
||||
this.setStatus(projectId, "ready");
|
||||
this.setSync(projectId, undefined);
|
||||
|
||||
activeSpan?.setAttributes({
|
||||
projectId: projectId,
|
||||
count: response?.total_results,
|
||||
});
|
||||
};
|
||||
|
||||
getIssueCount = async (projectId: string) => {
|
||||
|
|
@ -313,10 +303,7 @@ export class Storage {
|
|||
let issuesRaw: any[] = [];
|
||||
let count: any[];
|
||||
try {
|
||||
[issuesRaw, count] = await startSpan(
|
||||
{ name: "GET_ISSUES" },
|
||||
async () => await Promise.all([runQuery(query), runQuery(countQuery)])
|
||||
);
|
||||
[issuesRaw, count] = await Promise.all([runQuery(query), runQuery(countQuery)]);
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
const issueService = new IssueService();
|
||||
|
|
@ -372,18 +359,6 @@ export class Storage {
|
|||
next_page_results,
|
||||
total_pages,
|
||||
};
|
||||
|
||||
const activeSpan = getActiveSpan();
|
||||
activeSpan?.setAttributes({
|
||||
projectId,
|
||||
count: total_count,
|
||||
groupBy: group_by,
|
||||
subGroupBy: sub_group_by,
|
||||
queries: queries,
|
||||
local: true,
|
||||
groupCount,
|
||||
// subGroupCount,
|
||||
});
|
||||
return out;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { captureException } from "@sentry/nextjs";
|
||||
import pick from "lodash/pick";
|
||||
import { TIssue } from "@plane/types";
|
||||
import { rootStore } from "@/lib/store-context";
|
||||
|
|
@ -15,7 +14,6 @@ export const logError = (e: any) => {
|
|||
e = parseSQLite3Error(e);
|
||||
}
|
||||
console.error(e);
|
||||
captureException(e);
|
||||
};
|
||||
export const logInfo = console.info;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,15 +14,7 @@ const nextConfig = {
|
|||
return [
|
||||
{
|
||||
source: "/(.*)?",
|
||||
headers: [
|
||||
{ key: "X-Frame-Options", value: "SAMEORIGIN" },
|
||||
// {
|
||||
// key: "Referrer-Policy",
|
||||
// value: "origin-when-cross-origin",
|
||||
// },
|
||||
// { key: "Cross-Origin-Opener-Policy", value: "same-origin" },
|
||||
// { key: "Cross-Origin-Embedder-Policy", value: "credentialless" },
|
||||
],
|
||||
headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }],
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
@ -30,13 +22,6 @@ const nextConfig = {
|
|||
unoptimized: true,
|
||||
},
|
||||
transpilePackages: ["@plane/i18n"],
|
||||
// webpack: (config, { isServer }) => {
|
||||
// if (!isServer) {
|
||||
// // Ensure that all imports of 'yjs' resolve to the same instance
|
||||
// config.resolve.alias["yjs"] = path.resolve(__dirname, "node_modules/yjs");
|
||||
// }
|
||||
// return config;
|
||||
// },
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
|
|
@ -68,7 +53,6 @@ const nextConfig = {
|
|||
},
|
||||
async rewrites() {
|
||||
const posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://app.posthog.com";
|
||||
const uploadsBaseURL = process.env.NEXT_PUBLIC_API_BASE_URL || "";
|
||||
const rewrites = [
|
||||
{
|
||||
source: "/ingest/static/:path*",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue