Improve Sentry reporting

This commit is contained in:
Neil Alexander 2022-09-05 17:25:11 +01:00
parent ecee5f10f4
commit cd22ba22b0
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 17 additions and 0 deletions

View file

@ -60,6 +60,7 @@ func MakeAuthAPI(
// add the user to Sentry, if enabled
hub := sentry.GetHubFromContext(req.Context())
if hub != nil {
hub.Scope().SetTag("username", device.UserID)
hub.Scope().SetTag("user_id", device.UserID)
hub.Scope().SetTag("device_id", device.ID)
}