Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry にユーザ情報を追加 #674

Merged
merged 4 commits into from
Apr 18, 2023
Merged

Conversation

kichi2004
Copy link
Contributor

Sentry.setUser を使ってユーザ情報を追加
これでうまく動くかはわからないので様子見が必要かもしれないです

@kichi2004 kichi2004 requested review from HosokawaR and hayato24s April 7, 2023 10:23
@kichi2004 kichi2004 self-assigned this Apr 7, 2023
@vercel
Copy link

vercel bot commented Apr 7, 2023

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

Name Status Preview Comments Updated (UTC)
twinte-front-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 0:27am

Copy link
Member

@HosokawaR HosokawaR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

爆速対応ありがとうございます!こちら困っていたので助かります。

今回の変更ですが、App.vuemain.ts に書くのはどうでしょうか?
「Sentry に User 情報を送信する」という初期化処理のような内容は Layout.vue にあるよりも、Google Tag Manager や Sentry のその他の初期化と同じ App.vuemain.ts にあるほうが見通しやメンテナンス性の観点から有利かと感じました。

Comment on lines 35 to 36
ports.userRepository
.getUser()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#673 (comment) と同様に UseCase を介して参照し、現行のアーキテクチャに合わせたいです。

ただ現在は User を取得する UseCase が存在しないので、手間ですがそれも合わせて作る必要があります。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

現在のアーキテクチャだとUseCaseを介す必要があります。

ただ、めんどくさいんですよね。何かいい方法があれば言ってください!

@HosokawaR
Copy link
Member

@kichi2004
お疲れ様です。こちらいかがでしょうか…?

フィードバックがあったときに、User ID でエラーログが残っていないか確かめたいことが多く、早めに Merge できるといいなと考えています。

@kichi2004
Copy link
Contributor Author

@HosokawaR 修正しましたので確認お願いします!

@kichi2004 kichi2004 requested a review from HosokawaR April 18, 2023 12:48
Copy link
Member

@HosokawaR HosokawaR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!こちらで Sentry 動作確認もできました。
これからはエラー調査が楽になりそうで助かります!

@HosokawaR HosokawaR merged commit 4af1e31 into main Apr 18, 2023
@HosokawaR HosokawaR deleted the feature/add-user-to-sentry branch April 18, 2023 19:48
@HosokawaR
Copy link
Member

ちょうどユーザ数が少なそうでデプロイにいい時間帯なのでこちらで Merge & Deploy しちゃいますね

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants