Skip to content

Commit

Permalink
Revert "setup sentry for queries"
Browse files Browse the repository at this point in the history
breaks INSERTs and doesn't provide specific query information

This reverts commit 8a6b537.
  • Loading branch information
catdevnull committed Dec 21, 2024
1 parent 809b38e commit ed4f79e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 33 deletions.
20 changes: 0 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sitio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"markdown-it-table-of-contents": "^0.6.0",
"mode-watcher": "^0.5.0",
"nanoid": "^5.0.9",
"sentry-integration-libsql-client": "^1.3.0",
"svelte-echarts": "^0.1.1",
"svelte-mq-store": "^2.2.22",
"svelte-radix": "^2.0.1",
Expand Down
7 changes: 7 additions & 0 deletions sitio/src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { sequence } from "@sveltejs/kit/hooks";
import * as Sentry from "@sentry/sveltekit";

Sentry.init({
dsn: "https://79b56150c5092cdad5c56c62223a1a5d@o4507188153548800.ingest.de.sentry.io/4507188155646032",
tracesSampleRate: 1,
profilesSampleRate: 0.1,
enabled: import.meta.env.PROD,
});

export const handleError = Sentry.handleErrorWithSentry();
export const handle = sequence(Sentry.sentryHandle());
12 changes: 0 additions & 12 deletions sitio/src/lib/db/connectDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import * as schema from "../../schema";
import { drizzle } from "drizzle-orm/libsql";
import { createClient } from "@libsql/client";
import { migrate } from "drizzle-orm/libsql/migrator";
import { libsqlIntegration } from "sentry-integration-libsql-client";
import * as Sentry from "@sentry/sveltekit";

export async function connectDb({
url,
authToken,
Expand All @@ -13,15 +10,6 @@ export async function connectDb({
authToken?: string;
}) {
const client = createClient({ url, authToken });

Sentry.init({
dsn: "https://79b56150c5092cdad5c56c62223a1a5d@o4507188153548800.ingest.de.sentry.io/4507188155646032",
tracesSampleRate: 1,
profilesSampleRate: 0.1,
enabled: import.meta.env.PROD,
integrations: [libsqlIntegration(client, Sentry)],
});

// await client.execute(`PRAGMA journal_mode = WAL;`);
// await client.execute(`PRAGMA busy_timeout = 5000;`);
// await client.execute(`PRAGMA synchronous = NORMAL;`);
Expand Down

0 comments on commit ed4f79e

Please sign in to comment.