Development Environment

Setting up Your Development Environment


Just follow the official installation from source instructions.

Macintosh OS X

To get started, fork the repo at and clone it:

git clone<your github username>/sentry.git
cd sentry

Install Homebrew, if you haven’t already, then run brew install python@2.

It is highly recommended to develop inside a Python virtual environment, so install virtualenv and virtualenvwrapper:

pip install virtualenv virtualenvwrapper

Then append the following to your shell profile (e.g. ~/.bashrc) and reload it:

echo "source /usr/local/bin/" >> ~/.bashrc
exec bash

Setup and activate a Python 2.7 virtual environment in the project root:

mkvirtualenv sentry

Install nvm and use it to install the node version specified in the .nvmrc file:

brew install nvm
echo "source /usr/local/opt/nvm/" >> ~/.bashrc
exec bash
nvm install

Run the following to install the Python and JavaScript libraries and database services that Sentry depends on and some extra pieces that hold the development environment together:

make bootstrap

make bootstrap will generally run these sequence of commands (you can poke around through the Makefile file to see more details):

make install-system-pkgs
make develop
# creates a development configuration file at ~/.sentry/
sentry init --dev
# start up our development services
sentry devservices up
make create-db
make apply-migrations

Running the Development Server

Once you’ve successfully stood up your datastore, you can now run the development server:

sentry devserver --workers

When webpack finishes processing, you can find a login prompt for the user account you previously created at http://localhost:8000. From there, you are free to browse the website as an administrator.

Staging Your Changes

You’ve made your changes to the codebase, now it’s time to present them to the Sentry developers. It is recommended to first run the test suite locally in order to find any linting, syntax, or integration before you post a Pull Request.

Running the Test Suite Locally

There are no additional services required for running the Sentry test suite. To install dependent libraries, lint all source code, and run both the Python and JavaScript test suites, simply run:

make test