getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.55k stars 4.12k forks source link

Make geolocation tags searchable in Replays #50639

Open Fwang36 opened 1 year ago

Fwang36 commented 1 year ago

Problem Statement

The browser sdks populate the geolocation data for user and for node you can use setUser({}) to set user geolocation data like this -

Sentry.setUser({
            id: "123455",
            ip_address: "33.12.2.4",
            email: "fran@gmail.com",
            geo: {
                country_code: "usa",
                city: "baltimore"
            }
})

When set, you can search for the properties in Discover. Since replays use setUser({}) as well, we should make these properties also searchable for Replay.

Solution Brainstorm

Attach the geolocation data to replay events, or at least allow the geo.* tags to be searchable in the Replay search bar.

Product Area

Replays

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing, due by (sfo). ⏲️

getsantry[bot] commented 1 year ago

Routing to @getsentry/product-owners-replays for triage, due by (yyz). ⏲️

bruno-garcia commented 1 year ago

Thanks for raising this. We'll add this to our backlog and discuss it during backlog refinement. To help us understand the use case, could you share a bit how this can help you find relevant replays?

nikhaxuall commented 1 week ago

I'm not the original requester, but I'll share our use case. We have a low volume, high touch application. We occasionally have users reach out to our support team before they can be identified/tagged by our application. In those instances the replays only have the users IP address. Geo-location data can help our support team narrow down which replay is pertinent to the user. If there are currently 50 users going through our signup flow and only one of those is from Minneapolis, it's easy to match up the replay to the correct user. Currently they have to either guess, or get lucky finding something in Discover they can use to back into a replay.

bruno-garcia commented 1 week ago

In those instances the replays only have the users IP address.

Could you search by user.ip: xxx.xxx.xxx.xxx in that case? That should be already available

nikhaxuall commented 1 week ago

In those instances the replays only have the users IP address.

Could you search by user.ip: xxx.xxx.xxx.xxx in that case? That should be already available

Potentially, but our user-base is largely non-technical (and it's not uncommon for them to be tech-hostile). Walking them through getting their IP address would be a trial. Especially because they may be interfacing with our support team via phone or on a different device/location than where they initially encountered the error.

bruno-garcia commented 1 week ago

Oh I misunderstood this:

In those instances the replays only have the users IP address.

As you having the IP to search on.

Could you set the users email to the scope? and search by email?

nikhaxuall commented 6 days ago

We're tagging things as soon as we have the data. Unfortunately, some users are having issues before we're able to tag them. The geolocation info would just be another angle that could potentially help our support team narrow down which replay went with which user.

bruno-garcia commented 6 days ago

Thanks for sharing your use case. I'll tag @jas-kas for help prioritizing

bruno-garcia commented 4 days ago

This happens on Relay:

https://github.com/getsentry/relay/blob/b82aa67e8be9277ae826ee17a6ded22d133cdb9b/relay-event-normalization/src/event.rs#L512

@JoshFerge said:

just have to use the ip and get the lookup in relay and add it to the replay segment json