Event_id -> sentry issue url?

Hello,

We’re using the raven library to send exceptions generated from Python code to Sentry. The return value of the captureException() method is a client-generated id. I would like to use this ID to generate a Sentry dashboard URL linking to the related Sentry issue, but I’m not sure how. For instance, one recent exception I captured has the following characteristics:

event_id: d10be0c7e6aa450cbb5127e8249921f3
URL: https:||sentry.io|||issues|579522194|

When we visit the above URL, it clearly lists event_id as being a kind of clickable, unique identifier for the issue. However, the link itself doesn’t seem to use that same key.

Is there a URL structure exposed that will automatically redirect from, for example, https:||sentry.io|events|d10be0c7e6aa450cbb5127e8249921f3 to https:||sentry.io|||issues|579522194| ?

Is there some other way to generate and log a clickable URL on the event sender’s side? Is it a limitation of the raven Python client, which does not appear to store or return any data that results from sending the event to Sentry’s servers?

Thank you,
Kurtiss

1 Like

You’d have to know the org/project names in order to do it today. If you have that, you can enter it into the search bar on the issues page, or you can query the same API that the search bar uses (take a look via Chrome Inspector). We’ve talked about exposing a more global search here that’d let you look up events by ID without knowing the project.

Thanks for the reply! We do know the org and project, but we still don’t know the issue ID. The idea is not that we’d want to be able to search the dashboard for the event_id, which works well enough, but to be able to generate a clickable URL at event-send time (to send to our logs, for example). So, +1 for a global event url redirect structure (global search would be less helpful).

1 Like

You can do something like this for a clickable URL:

https://sentry.io/sentry/zeus/?query=2763c4eabd7240f59829ee1a02546293

(replace sentry/zeus accordingly)

1 Like

That’s perfect. Thanks!

The solution above seems to be outdated, what’s the better way to do it now?

Thanks!

The same rough link should work, you’ll just need to update the URL to the final form. At the very least, the above schema should correctly redirect you.

Yes, you’re correct. It does work.

Thank you!

Is there any way to get the project name from DSN? As you said earlier, we need org and project name to generate the sentry issue url. I need to generate that url in my code and all the information I have is the DSN.

Hello, I am trying to create this kind of link in my fallback component but I can’t get it to work.
I am using this pattern:
https://sentry.io/[organization name]]/[project slug]/?query=[event id]
as described above, but the link keep redirecting to the project issues page without filtering it to the queried event id.
Am I missing something in my URL or did this feature is not supported anymore?

After a few guesses I figured a working pattern is now:
https://sentry.io/[organization name]/[project slug]/events/[event id]

1 Like

In general if you search for an event ID you will get directed to the issue details page matching the event. When possible, we will also load up the exact event you searched for (vs just the latest). The only way in the product we allow you to go from a organization-wide event ID to an individual project would be in the issue search using the cross-project functionality.

Based on what @zeeg said last October about cross-project search, it looks like a working URL format (for the time being) is:

https://sentry.io/organizations/{org}/issues/?query={id}

That’ll load the search UI for a second with the query ID in the search field, but then immediately load the appropriate event in the appropriate issue.