fix(triage): fetch the linked Bugsnag event and rank errors by users - #1646
Merged
Merged
Conversation
bugsnag-top.sh built event_url as /projects/{pid}/errors/{id}/events/{event_id},
which Bugsnag answers with 404; the event-by-id endpoint is project-scoped
(/projects/{pid}/events/{event_id}), so step 2 of /triage had no event to read.
--url also dropped ?event_id= and always took the latest event, so a link to a
specific event could be triaged against a different one. It now honours the
query parameter, and --event-id does the same alongside --error-id.
release always came back "unknown" because the events list omits app info. It
is now read from the full event.
The default pick sorted by event count, so a single device in a retry loop outranked errors hitting many users. With --all, the top pick was a 408-event burst from 0 identified users, dead since 2026-08-08, ahead of open errors seen today by 75 users. Sorting by users makes those the first to triage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/triagestep 2 failed on every run:bugsnag-top.shemittedevent_urlas/projects/{pid}/errors/{id}/events/{event_id}, which returns 404. Bugsnag serves a single event from the project-scoped path,/projects/{pid}/events/{event_id}.Related fixes in the same script:
--urlignored?event_id=and always took the error's latest event, so a link to a specific event was triaged against whichever event came last. It now uses the linked event, and--event-iddoes the same alongside--error-id.releasewas always"unknown"because the events list doesn't include app info. It's now read from the full event, at the cost of one extra API request.sort=events,--allpicked a 408-event burst from 0 identified users that stopped on 2026-08-08, ahead of open errors seen today by 75 users. Errors with no identified user (for example, crashes during onboarding) now rank lower; a specific one can still be triaged with--urlor--error-id.