aboutsummaryrefslogtreecommitdiff
path: root/internal/httputil/httpapi.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-01-24 19:24:04 +0100
committerGitHub <noreply@github.com>2024-01-24 19:24:04 +0100
commitd58daf96655d8533c40be674fd11b74c38f40999 (patch)
treebc255d58745ccccba2e714ab74404f8dc0181daf /internal/httputil/httpapi.go
parent8e4dc6b4ae2e6b1ac8f62da2ba72deb282fb89b0 (diff)
Update sentry reporting (#3305)
This hopefully reduces the garbage we currently produce. (Using [GlitchTip](https://glitchtip.com/) on my personal instance, this seems to look better)
Diffstat (limited to 'internal/httputil/httpapi.go')
-rw-r--r--internal/httputil/httpapi.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/httputil/httpapi.go b/internal/httputil/httpapi.go
index 1966e754..c78aadf8 100644
--- a/internal/httputil/httpapi.go
+++ b/internal/httputil/httpapi.go
@@ -76,6 +76,8 @@ func MakeAuthAPI(
// add the user to Sentry, if enabled
hub := sentry.GetHubFromContext(req.Context())
if hub != nil {
+ // clone the hub, so we don't send garbage events with e.g. mismatching rooms/event_ids
+ hub = hub.Clone()
hub.Scope().SetUser(sentry.User{
Username: device.UserID,
})