Skip to content

Commit

Permalink
remove sentry & million
Browse files Browse the repository at this point in the history
  • Loading branch information
radityaharya committed Aug 5, 2024
1 parent 9395c3c commit d6cc0f9
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 109 deletions.
47 changes: 1 addition & 46 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import million from "million/compiler";
await import("./src/env.js");

import { withSentryConfig } from "@sentry/nextjs";

const config = {
experimental: {
instrumentationHook: true
Expand All @@ -22,46 +19,4 @@ const config = {
},
};

let sentryConfig = config;

if (process.env.NODE_ENV === "production") {
sentryConfig = withSentryConfig(
config,
{
silent: true,
org: "raditya-harya",
project: "flowify",
},
{
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Transpiles SDK to be compatible with IE11 (increases bundle size)
transpileClientSDK: false,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors.
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
},
);
}

const prodConfig = million.next(sentryConfig, {
rsc: true, // if used in the app router mode
});

export default prodConfig;
export default config;
50 changes: 0 additions & 50 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"ioredis": "^5.4.1",
"lodash": "^4.17.21",
"lucide-react": "^0.404.0",
"million": "^3.1.11",
"next": "^14.2.5",
"next-auth": "^4.24.7",
"next-themes": "^0.3.0",
Expand Down
2 changes: 1 addition & 1 deletion sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: "https://64d7c7e096529fb09786607e4566768c@o4505652838596608.ingest.sentry.io/4506564012212224",
dsn: process.env.SENTRY_DSN,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion sentry.edge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: "https://64d7c7e096529fb09786607e4566768c@o4505652838596608.ingest.sentry.io/4506564012212224",
dsn: process.env.SENTRY_DSN,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
2 changes: 1 addition & 1 deletion sentry.server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: "https://64d7c7e096529fb09786607e4566768c@o4505652838596608.ingest.sentry.io/4506564012212224",
dsn: process.env.SENTRY_DSN,

// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 1,
Expand Down
9 changes: 0 additions & 9 deletions src/instrumentation.ts

This file was deleted.

0 comments on commit d6cc0f9

Please sign in to comment.