mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-25 05:01:41 +00:00
Set Sentry user where known
This commit is contained in:
parent
cd22ba22b0
commit
5992b4c7ed
@ -60,7 +60,10 @@ func MakeAuthAPI(
|
|||||||
// add the user to Sentry, if enabled
|
// add the user to Sentry, if enabled
|
||||||
hub := sentry.GetHubFromContext(req.Context())
|
hub := sentry.GetHubFromContext(req.Context())
|
||||||
if hub != nil {
|
if hub != nil {
|
||||||
hub.Scope().SetTag("username", device.UserID)
|
hub.Scope().SetUser(sentry.User{
|
||||||
|
Username: device.UserID,
|
||||||
|
IPAddress: req.RemoteAddr,
|
||||||
|
})
|
||||||
hub.Scope().SetTag("user_id", device.UserID)
|
hub.Scope().SetTag("user_id", device.UserID)
|
||||||
hub.Scope().SetTag("device_id", device.ID)
|
hub.Scope().SetTag("device_id", device.ID)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user