Skip to content

Commit

Permalink
Merge pull request #172 from tsoporan/sentry-integration
Browse files Browse the repository at this point in the history
Sentry integration
  • Loading branch information
tsoporan authored Aug 3, 2019
2 parents d690c95 + 07b42be commit f348849
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 26 deletions.
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

0 comments on commit f348849

Please sign in to comment.