✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
feat: implement sentry cli
AykutSarac4b91dffd6050
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.ymlindex f8b8b960..d4ad5690 100644--- a/.github/workflows/nextjs.yml+++ b/.github/workflows/nextjs.yml@@ -100,3 +100,18 @@ jobs:- name: Deploy to GitHub Pagesid: deploymentuses: actions/deploy-pages@v1++ # Sentry job+ sentry:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v2+ - name: Sentry Release+ uses: getsentry/[email protected]+ env:+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}+ SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}+ with:+ environment: production+ sourcemaps: ./out\ No newline at end of filediff --git a/.gitignore b/.gitignoreindex e1ae6ba8..8aa75a4b 100644--- a/.gitignore+++ b/.gitignore@@ -39,4 +39,6 @@ yarn-error.log*# PWA workers**/public/workbox-*.js**/public/sw.js-**/public/fallback-*.js\ No newline at end of file+**/public/fallback-*.js+# Sentry Auth Token+.sentryclircdiff --git a/next.config.js b/next.config.jsindex cb945ff2..4ddc1dea 100644--- a/next.config.js+++ b/next.config.js@@ -1,9 +1,4 @@-const withBundleAnalyzer =- process.env.ANALYZE === "true"- ? require("@next/bundle-analyzer")({- enabled: process.env.ANALYZE === "true",- })()- : x => x;+const { withSentryConfig } = require("@sentry/nextjs");/*** @type {import('next').NextConfig}@@ -16,4 +11,16 @@ const config = {},};-module.exports = withBundleAnalyzer(config);+module.exports = withSentryConfig(+ config,+ {+ silent: true,+ org: "aykut-sarac",+ project: "json-crack",+ },+ {+ widenClientFileUpload: true,+ hideSourceMaps: true,+ disableLogger: true,+ }+);diff --git a/sentry.client.config.ts b/sentry.client.config.tsnew file mode 100644index 00000000..af49fc88--- /dev/null+++ b/sentry.client.config.ts@@ -0,0 +1,30 @@+// This file configures the initialization of Sentry on the client.+// The config you add here will be used whenever a users loads a page in their browser.+// https://docs.sentry.io/platforms/javascript/guides/nextjs/+import * as Sentry from "@sentry/nextjs";++Sentry.init({+ enabled: process.env.NODE_ENV === "development",+ dsn: "https://[email protected]/6495191",++ // Adjust this value in production, or use tracesSampler for greater control+ tracesSampleRate: 0.2,++ // Setting this option to true will print useful information to the console while you're setting up Sentry.+ debug: false,++ replaysOnErrorSampleRate: 1.0,++ // This sets the sample rate to be 10%. You may want this to be 100% while+ // in development and sample at a lower rate in production+ replaysSessionSampleRate: 0.1,++ // You can remove this option if you're not planning to use the Sentry Session Replay feature:+ integrations: [+ new Sentry.Replay({+ // Additional Replay configuration goes in here, for example:+ maskAllText: true,+ blockAllMedia: true,+ }),+ ],+});diff --git a/sentry.edge.config.ts b/sentry.edge.config.tsnew file mode 100644index 00000000..872c6412--- /dev/null+++ b/sentry.edge.config.ts@@ -0,0 +1,3 @@+{+ /* empty */+}diff --git a/sentry.server.config.ts b/sentry.server.config.tsnew file mode 100644index 00000000..872c6412--- /dev/null+++ b/sentry.server.config.ts@@ -0,0 +1,3 @@+{+ /* empty */+}diff --git a/src/pages/_app.tsx b/src/pages/_app.tsxindex 4d1473a8..d8c32ac8 100644--- a/src/pages/_app.tsx+++ b/src/pages/_app.tsx@@ -3,7 +3,6 @@ import type { AppProps } from "next/app";import localFont from "next/font/local";import { ThemeProvider } from "styled-components";import { MantineProvider } from "@mantine/core";-import { init } from "@sentry/nextjs";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { Toaster } from "react-hot-toast";import { GoogleAnalytics } from "src/components/GoogleAnalytics";@@ -13,14 +12,6 @@ import { ExternalMode } from "src/layout/DevMode";import { ModalController } from "src/layout/ModalController";import useStored from "src/store/useStored";-if (process.env.NODE_ENV !== "development") {- init({- dsn: "https://[email protected]/6495191",- tracesSampleRate: 0.25,- release: "production",- });-}-const queryClient = new QueryClient({defaultOptions: {queries: {