This repo is derived from the official example.
docker build -t sentry-tunnel .
docker run --rm -it --name sentry-tunnel -v $(pwd):/app -e ALLOWED_SENTRY_HOSTS=o123123123.ingest.sentry.io -e ALLOWED_SENTRY_PROJECT_IDS=456456456 -e DEPLOYMENT_ENVIRONMENT=dev -e SENTRY_DSN=<optional> -p 5000:5000 sentry-tunnelBelow is the original README:
This example shows how you can use Flask to proxy events to Sentry.
The app always returns with status code 200, even if the request to Sentry failed, to prevent brute force guessing of allowed configuration options.
- Install requirements (preferably in some venv):
pip install -r requirements.txt - Adjust
sentry_hostandknown_project_idsin theapp.pyto your needs - Run the app with e.g.:
flask run - Send sentry event to
http://localhost:5000/bugs, e.g. via the test html mentioned at examples/tunneling