Setting up Your Development Environment
Follow the Docker file in the repository but instead of creating and installing a wheel, install the package in editable mode (
pip install . -e).
Macintosh OS X
To get started, fork the repo at https://github.com/getsentry/sentry and clone it:
git clone https://github.com/<your github username>/sentry.git cd sentry
Install Homebrew, if you haven’t already. Run
brew bundle to install the various system packages as listed in sentry’s
Brewfile. This will install, among other things, Python 2 and docker.
Setup and activate a python 2 virtual environment:
python2 -m pip install virtualenv python2 -m virtualenv .venv source .venv/bin/activate
nvm and use it to install the node version specified in sentry’s
brew install nvm echo "source /usr/local/opt/nvm/nvm.sh" >> ~/.bashrc exec bash nvm install
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.conf.py 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
If you are developing for aesthetics only and do not rely on the async workers, you can omit the
--workers flag in order to use less system resources.
If you would like to be able to run
devserver outside of your root checkout, you can install
webpack globally with
npm install -g webpack.
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
If you find yourself constantly running
make test and wishing it was faster, running either
make test-js or
make test-python will only run the test suite with the corresponding language, skipping over linting and dependency checks. If you would like to see even more options, check out other entry points in the