mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
feat: implement sentry cli
This commit is contained in:
parent
5c9ad22aa7
commit
4b91dffd60
15
.github/workflows/nextjs.yml
vendored
15
.github/workflows/nextjs.yml
vendored
@ -100,3 +100,18 @@ jobs:
|
|||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v1
|
uses: actions/deploy-pages@v1
|
||||||
|
|
||||||
|
# Sentry job
|
||||||
|
sentry:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Sentry Release
|
||||||
|
uses: getsentry/action-release@v1.0.0
|
||||||
|
env:
|
||||||
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||||
|
with:
|
||||||
|
environment: production
|
||||||
|
sourcemaps: ./out
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -40,3 +40,5 @@ yarn-error.log*
|
|||||||
**/public/workbox-*.js
|
**/public/workbox-*.js
|
||||||
**/public/sw.js
|
**/public/sw.js
|
||||||
**/public/fallback-*.js
|
**/public/fallback-*.js
|
||||||
|
# Sentry Auth Token
|
||||||
|
.sentryclirc
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
const withBundleAnalyzer =
|
const { withSentryConfig } = require("@sentry/nextjs");
|
||||||
process.env.ANALYZE === "true"
|
|
||||||
? require("@next/bundle-analyzer")({
|
|
||||||
enabled: process.env.ANALYZE === "true",
|
|
||||||
})()
|
|
||||||
: x => x;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @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,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
30
sentry.client.config.ts
Normal file
30
sentry.client.config.ts
Normal file
@ -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://d3345591295d4dd1b8c579b62003d939@o1284435.ingest.sentry.io/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,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
3
sentry.edge.config.ts
Normal file
3
sentry.edge.config.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
/* empty */
|
||||||
|
}
|
3
sentry.server.config.ts
Normal file
3
sentry.server.config.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
/* empty */
|
||||||
|
}
|
@ -3,7 +3,6 @@ import type { AppProps } from "next/app";
|
|||||||
import localFont from "next/font/local";
|
import localFont from "next/font/local";
|
||||||
import { ThemeProvider } from "styled-components";
|
import { ThemeProvider } from "styled-components";
|
||||||
import { MantineProvider } from "@mantine/core";
|
import { MantineProvider } from "@mantine/core";
|
||||||
import { init } from "@sentry/nextjs";
|
|
||||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
import { GoogleAnalytics } from "src/components/GoogleAnalytics";
|
import { GoogleAnalytics } from "src/components/GoogleAnalytics";
|
||||||
@ -13,14 +12,6 @@ import { ExternalMode } from "src/layout/DevMode";
|
|||||||
import { ModalController } from "src/layout/ModalController";
|
import { ModalController } from "src/layout/ModalController";
|
||||||
import useStored from "src/store/useStored";
|
import useStored from "src/store/useStored";
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== "development") {
|
|
||||||
init({
|
|
||||||
dsn: "https://d3345591295d4dd1b8c579b62003d939@o1284435.ingest.sentry.io/6495191",
|
|
||||||
tracesSampleRate: 0.25,
|
|
||||||
release: "production",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
queries: {
|
queries: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user