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

David Burke 73ffafff77 experiment 1 год назад
.vscode 055e638728 working on adding linting and isort on CI 2 лет назад
alerts 1def62fa9d Add uptime discord webhook 1 год назад
api_tokens 32cb1a4c60 lint 1 год назад
assets 7b290b5349 HTML emails! 4 лет назад
bin 09b2071ad5 Decreased UWSGI_LISTEN from 256 to 128 1 год назад
bitfield c115d82480 lint 1 год назад
difs 241f9afa1a Isort and lint more on CI 1 год назад
djstripe_ext b9fc20c675 Speed up stats_v2 api 1 год назад
environments 241f9afa1a Isort and lint more on CI 1 год назад
events 73ffafff77 experiment 1 год назад
files 241f9afa1a Isort and lint more on CI 1 год назад
glitchtip a171223e2d Fix heartbeat check issue and make heartbeat URL ignore csrf 1 год назад
issues 73ffafff77 experiment 1 год назад
monitoring 13dd870b9d Add prometheus to docker compose for testing 2 лет назад
observability fea81d50e6 Update uwsgi defaults 1 год назад
organizations_ext 7152dc4357 Add status page 1 год назад
performance aa02a86bd8 Merge branch 'op-span-optional' into 'master' 1 год назад
projects f968ce36af Deal with celery undocumented breaking changes 1 год назад
releases ff1cc1cf34 Removes ProjectReferenceWithMemberSerializer and uses OrganizationProject instead for nested projects on org detail 1 год назад
sentry 0c4a19addc Make unzipped payload max configurable 1 год назад
teams 2f588e276e Refactor project views 1 год назад
templates 36896f77ea Resolve "Style 404 page" 3 лет назад
test_api 241f9afa1a Isort and lint more on CI 1 год назад
uploads 40f7adec8c Add uploads folder to repo with gitignore 2 лет назад
user_reports 241f9afa1a Isort and lint more on CI 1 год назад
users c85a25e870 Update hash name in serializer 1 год назад
.dockerignore 290e8a6dfa Don't include test data in docker images 2 лет назад
.gitignore 40f7adec8c Add uploads folder to repo with gitignore 2 лет назад
.gitlab-ci.yml fcf19adca8 Set docker hub minor version 1 год назад
.pylintrc 055e638728 working on adding linting and isort on CI 2 лет назад
CONTRIBUTING.md f2ab6d010d Update CONTRIBUTING.md 1 год назад
Dockerfile 62c72ca3ac Revert "Experiment to try Python 3.11 builds for arm" 1 год назад
LICENSE 5718e945ba Add license 4 лет назад
NOTICE.md 8b3a243b24 Add environment tag creation 3 лет назад
README.md 13dd870b9d Add prometheus to docker compose for testing 2 лет назад
docker-compose.locust.yml 199dbcc672 Update docker compose version 4 лет назад
docker-compose.metrics.yml 13dd870b9d Add prometheus to docker compose for testing 2 лет назад
docker-compose.yml fa98e6e714 Experiment with using flower for celery monitoring 1 год назад
get_or_create_issue2.sql 73ffafff77 experiment 1 год назад
locustfile.py 241f9afa1a Isort and lint more on CI 1 год назад
manage.py eaeeddab42 Update black 1 год назад
mypy.ini 04ed0813c0 Start on webhook ideas 3 лет назад
poetry.lock 50320ade37 chore(deps): update dependency sentry-sdk to v1.27.1 1 год назад
pyproject.toml 5197999a28 Seriously no REALL REALLY REALLY please please please use and only use 1 год назад
renovate.json 93b7dc05f9 . 1 год назад

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