Django backend for GlitchTip https://glitchtip.com/

David Burke 3e5652e11d Fix program_limit_exceeded issue on search vector generation 1 year ago
.vscode 055e638728 working on adding linting and isort on CI 3 years ago
alerts 9505d207da Squash migration 1 year ago
api_tokens 483d854b96 Squash migrations on alerts, api_tokens, environments 1 year ago
assets 7b290b5349 HTML emails! 4 years ago
bin daef26a318 Use upstream uWSGI and Celery env vars and (some) defaults 2 years ago
difs f8d8c83b84 Only run dif process task when dif files exist for issue's project 2 years ago
djstripe_ext b25bf040a8 Fix test 2 years ago
environments 483d854b96 Squash migrations on alerts, api_tokens, environments 1 year ago
events 239a52bf30 Fixes #196 1 year ago
files 9505d207da Squash migration 1 year ago
glitchtip 84c5484245 Broken and untested 1 year ago
issues 3e5652e11d Fix program_limit_exceeded issue on search vector generation 1 year ago
monitoring 13dd870b9d Add prometheus to docker compose for testing 2 years ago
observability d0858dee54 Implemented observability API 2 years ago
organizations_ext 8c7af007f0 Update save method, issue_event_count and tests 1 year ago
performance 0008985079 Set queryset before loop 1 year ago
projects bcb35d383b Count event statistics 1 year ago
releases 526c77eb52 Squash organizations migrations 1 year ago
sentry f37bda6bb0 Lint fixes 2 years ago
teams 526c77eb52 Squash organizations migrations 1 year ago
templates 36896f77ea Resolve "Style 404 page" 3 years ago
test_api b6eecacb40 Adds monitor to data seeding for integration testing 3 years ago
uploads 40f7adec8c Add uploads folder to repo with gitignore 2 years ago
user_reports b887c007dd Migrate to bigautofield 1 year ago
users 9505d207da Squash migration 1 year ago
.dockerignore 290e8a6dfa Don't include test data in docker images 2 years ago
.gitignore 40f7adec8c Add uploads folder to repo with gitignore 2 years ago
.gitlab-ci.yml 973fced414 test 1 year ago
.isort.cfg a9620b481d Fix error on event json view, internal code GLITCHTIP-BACKEND-1H1 2 years ago
.pylintrc 055e638728 working on adding linting and isort on CI 3 years ago
CONTRIBUTING.md 3f52adf5bc Note about contributing legacy sdk client support 2 years ago
Dockerfile 62c72ca3ac Revert "Experiment to try Python 3.11 builds for arm" 1 year ago
LICENSE 5718e945ba Add license 5 years ago
NOTICE.md 8b3a243b24 Add environment tag creation 4 years ago
README.md 13dd870b9d Add prometheus to docker compose for testing 2 years ago
docker-compose.locust.yml 199dbcc672 Update docker compose version 4 years ago
docker-compose.metrics.yml 13dd870b9d Add prometheus to docker compose for testing 2 years ago
docker-compose.yml 074543046b Update to Python 3.11 and Postgres 15 2 years ago
locustfile.py ef2b80bcdc Move events model to own app 3 years ago
manage.py 5e245f6ac0 initial commit 5 years ago
mypy.ini 04ed0813c0 Start on webhook ideas 3 years ago
poetry.lock cac2f6f69d Update dependency sentry-sdk to v1.12.1 1 year ago
pyproject.toml 562f0e40d9 Try again 1 year ago
renovate.json 72175cc7c9 chore(renovate): Adjust config: Enable Dashboard, Prioritize patches 2 years ago

README.md

Gitter

GlitchTip Backend

GlitchTip is an open source, Sentry API compatible error tracking platform. It is a partial fork/mostly re-implementation of Sentry's open source codebase before it went proprietary. Its goals are to be a modern, easy-to-develop error tracking platform that respects your freedom to use it any way you wish. Some differences include:

  • A modern development environment with Python 3 and Django 4.
  • Simplicity over features. We use Postgres to store error data. Our code base is a fraction of the size of Sentry and looks like a typical Django app. We leverage existing open source Django ecosystem apps whenever possible.
  • Respects your privacy. No massive JS bundles. No invasive tracking. No third party spying. Our marketing site runs the privacy-focused Plausible analytics. Self hosted GlitchTip will never report home. We will never know if you run it yourself.
  • Commitment to open source. We use open source tools like GitLab whenever possible. With our MIT license, you can use it for anything you'd like and even sell it. We believe in competition and hope you make GlitchTip even better.

Project status: Stable. Open an issue and say hello if you'd like to help. We are able to process basic error requests from the open source Sentry client tools. More features are on the way.

Developing

We use Docker for development. View our Contributing documentation if you'd like to help make GlitchTip better.

Run local dev environment

  1. Ensure docker and docker-compose are installed
  2. docker compose up
  3. docker compose run --rm web ./manage.py migrate

Run tests with docker-compose run --rm web ./manage.py test

Run HTTPS locally for testing FIDO2 keys

  1. cp docker-compose.yml docker-compose.override.yml
  2. Edit the override file and set command: ./manage.py runsslserver 0.0.0.0:8000
  3. Restart docker compose services

VS Code (Optional)

VS Code can do type checking and type inference. However, it requires setting up a virtual environment.

  1. Install Python 3 dependencies. For Ubuntu this is apt install python3-dev python3-venv
  2. Install poetry
  3. Create Python virtual environment python3 -m venv env
  4. Activate environment source env/bin/activate
  5. Install packages poetry install

Load testing

Locust is built into the dev dependencies. To run with Locust run docker compose -f docker-compose.yml -f docker-compose.locust.yml up

Now go to localhost:8089 to run the test.

Locust will not be installed to production docker images and cannot be run from them.

Observability metrics with Prometheus

  1. Edit monitoring/prometheus/prometheus.yml and set credentials to a GlitchTip auth token
  2. docker compose -f docker-compose.yml -f docker-compose.metrics.yml up

GCP Logging

In order to enable json logging, set the environment as follows::

DJANGO_LOGGING_HANDLER_CLASS=google.cloud.logging_v2.handlers.ContainerEngineHandler
UWSGI_LOG_ENCODER='json {"severity":"info","timestamp":${unix},"message":"${msg}"}}'

Acknowledgements

  • Thank you to the Sentry team for their ongoing open source SDK work and formerly open source backend of which this project is based on.
  • We use element.io for internal chat and public gitter room
  • Plausible Analytics is used for analytics