nekochans / lgtm-cat-frontend

lgtm-cat(サービス名 LGTMeow https://lgtmeow.com) のフロントエンド用
https://lgtmeow.com
21 stars 2 forks source link

Sentryの設定を最新の書き方に合わせて修正 #321

Closed keitakn closed 1 month ago

keitakn commented 2 months ago

issueURL

https://github.com/nekochans/lgtm-cat-frontend/issues/320

関連 URL

https://lgtm-cat-frontend-git-feature-issue320fix-sent-c222bc-nekochans.vercel.app/

このPRで対応すること / このPRで対応しないこと

Sentryの書き方を https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ に合わせて最新に書き換える。

@sentry/nextjs を最新安定版に更新する。

Storybook の URL もしくはスクリーンショット

UI変更はないのでなし。

変更点概要

対応内容に関しては https://github.com/nekochans/ai-cat-frontend/pull/104 でやった内容を参考にSentryの設定を最新の書き方に合わせて修正している。

こちらだと src/utils/sentry.ts 内で Sentry.configureScope を利用していたので以下のアップグレードガイドを参考に Sentry.getCurrentScope() を利用するように変更した。

https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#removal-of-sentryconfigurescope-method

レビュアーに重点的にチェックして欲しい点

特になし

補足情報

特になし

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lgtm-cat-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2024 3:45pm
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 36 lines in your changes missing coverage. Please review.

Project coverage is 21.75%. Comparing base (8b48906) to head (0a0e0db).

Files Patch % Lines
sentry.client.config.ts 0.00% 15 Missing and 1 partial :warning:
src/instrumentation.ts 0.00% 8 Missing and 1 partial :warning:
next.config.mjs 0.00% 5 Missing :warning:
sentry.edge.config.ts 0.00% 2 Missing :warning:
sentry.server.config.ts 0.00% 2 Missing :warning:
src/utils/sentry.ts 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #321 +/- ## ========================================== - Coverage 21.85% 21.75% -0.11% ========================================== Files 240 244 +4 Lines 9735 9780 +45 Branches 300 304 +4 ========================================== Hits 2128 2128 - Misses 7429 7470 +41 - Partials 178 182 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.