Backend Development Server

(see also: Frontend Development Server)

It's possible to run Sentry locally without ever having to build the frontend. It requires to circumvent sentry devserver. Instead, you configure:

# ~/.sentry/
STATIC_URL = "{version}"

...and run:

sentry run web

When you browse localhost:9001, the browser will load JavaScript from production instead of your local static folder.

This will do literally nothing except bring up the web workers. You are now responsible to manually:

  • Starting Relay if you need it: sentry devservices attach relay
  • Starting relevant Kafka consumers if you need them (e.g. for ingestion). This highly depends on which dataset you're working on.
  • Starting Celery workers using sentry run worker to run most kinds of background jobs.

Use sentry run --help to see what you might be missing by not running devserver.

The development server can be operated behind ngrok for when you need to receive traffic from the outside world. This comes up frequently when working with integrations. Start off by defining a configuration file for ngrok:

version: '2'
    proto: http
    hostname: <yourname>
    addr: 8010
    host_header: 'rewrite'

Next start up ngrok with your configuration file:

ngrok start --all --config ngrok.yml`

When starting devserver provide your ngrok domain

sentry devserver --ngrok=<yourname>
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").