Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry integration #172

Merged
merged 3 commits into from
Aug 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ name = "pypi"

[packages]
Django = "==2.2.3"
hashids = "*"
django-cors-headers = "*"
django-extensions = "*"
django-filter = "*"
Werkzeug = "*"
graphene = ">=2.0"
graphene-django = ">=2.0"
django-graphql-jwt = "*"
django-webpack-loader = "*"
gunicorn = "*"
django-allow-cidr = "*"
"psycopg2-binary" = "*"
django-allauth = "*"
requests = "==2.20"
hashids = "==1.2.0"
django-cors-headers = "==3.0.2"
django-extensions = "==2.2.1"
django-filter = "==2.2.0"
Werkzeug = "==0.15.5"
graphene = "==2.1.7"
graphene-django = "==2.4.0"
django-graphql-jwt = "==0.2.1"
django-webpack-loader = "==0.6.0"
gunicorn = "==19.9.0"
django-allow-cidr = "==0.3.1"
psycopg2-binary = "==2.8.3"
django-allauth = "==0.39.1"
requests = "==2.22.0"
sentry-sdk = "==0.10.2"

[dev-packages]
snapshottest = "*"
ipython = "*"
snapshottest = "==0.5.1"
ipython = "==7.7.0"
black = "==19.3b0"
isort = "==4.3.21"
flake8 = "==3.7.8"
64 changes: 54 additions & 10 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions fittrak/fittrak/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
import os
import sys

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"), integrations=[DjangoIntegration()])

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand Down Expand Up @@ -93,6 +98,7 @@
}

# Patch the DB to be sqlite in test env

if "test" in sys.argv:
defaults = {"ENGINE": "django.db.backends.sqlite3", "NAME": "fittrak_test"}

Expand Down Expand Up @@ -187,6 +193,7 @@

# Production override
# TODO: should really be separate settings files

if DEBUG:
ALLOWED_HOSTS = ["*"]

Expand Down