aboutsummaryrefslogtreecommitdiff
path: root/relayapi
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 /relayapi
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 'relayapi')
-rw-r--r--relayapi/routing/routing.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/relayapi/routing/routing.go b/relayapi/routing/routing.go
index f11b0a7c..92476d6c 100644
--- a/relayapi/routing/routing.go
+++ b/relayapi/routing/routing.go
@@ -108,6 +108,8 @@ func MakeRelayAPI(
// 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().SetTag("origin", string(fedReq.Origin()))
hub.Scope().SetTag("uri", fedReq.RequestURI())
}