Sentry Suspect Commits Clarification

Hello !

We have just started using sentry suspect commits and we love the fature so far.

But we’re having trouble understanding how it works on a more technical level.

I have tried reaching out the support but I only get links to basic documentation on how suspect commits work.

These problems are originating because of the workflow we use at my company.

Our workflow looks something like this:

Part 1 of workflow

We create an app everytime one of our pull requests is created/updated. Alongside with the creation of the app we also create a sentry release and enable suspect commits for that app. Similar to heroku review apps(Review Apps (New) | Heroku Dev Center) or GitLab Review Apps(Review Apps | GitLab)

Apps created in this part of the workflow are in the “DEVELOPMENT” environment

Part 2 of workflow

We also have an app that is always up to date with the master branch, so whenever a PR gets merged to master we update the app and create a new release and enable suspect commits for that app.

The app created/updated in the part of the workflow is in the “STAGING” environment

So these are my current problems/questions:

1. Is there a way to filter suspect commits on a sentry issue based of the environment ?

I only want to see suspect commits coming in from the app originating from the master branch(STAGING environment)(part 2 of workflow).

I don’t want to see suspect commits which originate from the “DEVELOPMENT” environment

2. Can commits not associated with releases appear in suspect commits ?

We just started using sentry after years of pushing code. I was wondering what happens when an error is thrown which is linked to a very old commit. Does that old commit show as a suspect commit ?

For clarity these are the steps taken to create sentry releases and enable suspect commits(without including the SDK code):

  1. A sentry release is created and finalized

$ sentry-cli releases new --finalize $SENTRY_RELEASE

  1. Upload source maps to sentry

$ sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps --url-prefix “~app/$SOURCE_MAPS_DIRECTORY” $SOURCE_MAPS_DIRECTORY

  1. Enable suspect commits for that release


SENTRY_FROM_COMMIT=(git log origin/master…$GITHUB_HEAD_REF --oneline --no-abbrev-commit | tail -1 | awk ‘{print $1}’)

SENTRY_TO_COMMIT=(git rev-parse HEAD)


For the STAGING app

$ sentry-cli releases set-commits --auto $SENTRY_RELEASE

Did anyone have the same questions/problems/use cases before, and if so how did you fix them ? If not I would really like to hear how you guys use suspect commits in your workflow.

Also it would really be appreciated if more technical docs around releases/suspect commits would be created in the first place. I feel like that part of the product is not documented that well.

1 Like

Update, support got back to me with some answers

  1. You cannot filter suspect commits based of an environment
  2. Commits not associated with a release will not show as suspect commits