-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: github actions 및 Sentry 설정 및 에러 추적 코드 추가
* sentry.client.config.ts, sentry.edge.config.ts, sentry.server.config.ts: Sentry 설정 완료 * src/app/global-error.tsx: 글로벌 에러 발생 시 Sentry에 보고하도록 수정 * src/app/sentry-example-page/page.tsx: 예시 페이지에 Sentry 이벤트 발생 코드 추가 production 환경에서 발생하는 에러를 추적하고 분석하기 위해 Sentry를 설정했습니다.
- Loading branch information
Showing
12 changed files
with
2,846 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: GitHub Actions Demo | ||
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | ||
on: [push] | ||
jobs: | ||
Explore-GitHub-Actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,6 @@ yarn-error.log* | |
next-env.d.ts | ||
|
||
#.vscode | ||
.vscode | ||
.vscode | ||
# Sentry Config File | ||
.env.sentry-build-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
import {withSentryConfig} from "@sentry/nextjs"; | ||
// next.config.mjs | ||
export default { | ||
async redirects() { | ||
return [ | ||
{ | ||
source: "/board", | ||
destination: "/", | ||
permanent: true, // true일 경우 308 Permanent Redirect, false일 경우 307 Temporary Redirect | ||
}, | ||
]; | ||
export default withSentryConfig({ | ||
async redirects() { | ||
return [ | ||
{ | ||
source: "/board", | ||
destination: "/", | ||
permanent: true, // true일 경우 308 Permanent Redirect, false일 경우 307 Temporary Redirect | ||
}, | ||
}; | ||
]; | ||
} | ||
}, { | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options | ||
|
||
org: "codeit-qw", | ||
project: "javascript-nextjs-3x", | ||
|
||
// Only print logs for uploading source maps in CI | ||
silent: !process.env.CI, | ||
|
||
// 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, | ||
|
||
// Automatically annotate React components to show their full name in breadcrumbs and session replay | ||
reactComponentAnnotation: { | ||
enabled: true, | ||
}, | ||
|
||
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. | ||
// This can increase your server load as well as your hosting bill. | ||
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- | ||
// side errors will fail. | ||
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. (Does not yet work with App Router route handlers.) | ||
// See the following for more information: | ||
// https://docs.sentry.io/product/crons/ | ||
// https://vercel.com/docs/cron-jobs | ||
automaticVercelMonitors: true, | ||
}); |
Oops, something went wrong.