mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-16 11:39:41 +00:00
Properly migrate to Sentry from Raven
This commit is contained in:
2
Pipfile
2
Pipfile
@@ -57,7 +57,6 @@ pytz = "==2020.5"
|
||||
pytest-django = "==4.1.0"
|
||||
pytest-xdist = "==2.2.0"
|
||||
pytest-cov = "==2.11.1"
|
||||
raven = "==6.10.0"
|
||||
reportlab = "==3.5.59"
|
||||
requests = "==2.25.1"
|
||||
retrying = "==1.3.3"
|
||||
@@ -83,6 +82,7 @@ zipp = "==3.4.0"
|
||||
"zope.interface" = "==5.2.0"
|
||||
"zope.proxy" = "==4.3.5"
|
||||
"zope.schema" = "==6.0.1"
|
||||
sentry-sdk = "*"
|
||||
|
||||
[dev-packages]
|
||||
pycodestyle = "*"
|
||||
|
||||
18
Pipfile.lock
generated
18
Pipfile.lock
generated
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "c5bbb79509654e03e197a03b46f5e9ba2480c643b9d6084862c9c07831d0594d"
|
||||
"sha256": "4732e1d9322436271c9806c294ee0d5308298ef75bd3c343bf017be7889204e7"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
@@ -746,14 +746,6 @@
|
||||
"index": "pypi",
|
||||
"version": "==2020.5"
|
||||
},
|
||||
"raven": {
|
||||
"hashes": [
|
||||
"sha256:3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54",
|
||||
"sha256:44a13f87670836e153951af9a3c80405d36b43097db869a36e92809673692ce4"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==6.10.0"
|
||||
},
|
||||
"reportlab": {
|
||||
"hashes": [
|
||||
"sha256:009fa61710647cdc62eb373345248d8ebb93583a058990f7c4f9be46d90aa5b1",
|
||||
@@ -823,6 +815,14 @@
|
||||
"index": "pypi",
|
||||
"version": "==3.141.0"
|
||||
},
|
||||
"sentry-sdk": {
|
||||
"hashes": [
|
||||
"sha256:0a711ec952441c2ec89b8f5d226c33bc697914f46e876b44a4edd3e7864cf4d0",
|
||||
"sha256:737a094e49a529dd0fdcaafa9e97cf7c3d5eb964bd229821d640bc77f3502b3f"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.19.5"
|
||||
},
|
||||
"simplejson": {
|
||||
"hashes": [
|
||||
"sha256:034550078a11664d77bc1a8364c90bb7eef0e44c2dbb1fd0a4d92e3997088667",
|
||||
|
||||
@@ -13,7 +13,8 @@ import datetime
|
||||
import os
|
||||
import secrets
|
||||
|
||||
import raven
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
from envparse import env
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||
@@ -71,11 +72,9 @@ INSTALLED_APPS = (
|
||||
'reversion',
|
||||
'captcha',
|
||||
'widget_tweaks',
|
||||
'raven.contrib.django.raven_compat',
|
||||
)
|
||||
|
||||
MIDDLEWARE = (
|
||||
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
@@ -177,9 +176,12 @@ else:
|
||||
}
|
||||
}
|
||||
|
||||
RAVEN_CONFIG = {
|
||||
'dsn': env('RAVEN_DSN', default=""),
|
||||
}
|
||||
# Error/performance monitoring
|
||||
sentry_sdk.init(
|
||||
dsn=env('SENTRY_DSN', default=""),
|
||||
integrations=[DjangoIntegration()],
|
||||
traces_sample_rate=1.0,
|
||||
)
|
||||
|
||||
# User system
|
||||
AUTH_USER_MODEL = 'RIGS.Profile'
|
||||
|
||||
@@ -36,7 +36,6 @@ function scripts() {
|
||||
'node_modules/jquery-ui-dist/jquery-ui.js',
|
||||
|
||||
'node_modules/popper.js/dist/umd/popper.js',
|
||||
'node_modules/raven-js/dist/raven.js', //TODO Upgrade to Sentry
|
||||
/* Bootstrap Plugins */
|
||||
'node_modules/bootstrap/js/dist/util.js',
|
||||
'node_modules/bootstrap/js/dist/tooltip.js',
|
||||
@@ -62,10 +61,9 @@ function scripts() {
|
||||
}
|
||||
|
||||
function browserSync(done) {
|
||||
spawn('python', ['manage.py', 'runserver', '--nostatic'/*For Whitenoise, better matches prod */], {stdio: 'inherit'});
|
||||
spawn('python', ['manage.py', 'runserver'], {stdio: 'inherit'});
|
||||
// TODO Wait for Django server to come up before browsersync, it seems inconsistent
|
||||
browsersync.init({
|
||||
notify: true,
|
||||
port: 8001,
|
||||
proxy: 'localhost:8000'
|
||||
});
|
||||
|
||||
11
package-lock.json
generated
11
package-lock.json
generated
@@ -33,7 +33,6 @@
|
||||
"moment": "^2.27.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"raven-js": "^3.27.2",
|
||||
"uglify-js": "^3.12.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -6852,11 +6851,6 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/raven-js": {
|
||||
"version": "3.27.2",
|
||||
"resolved": "https://registry.npmjs.org/raven-js/-/raven-js-3.27.2.tgz",
|
||||
"integrity": "sha512-mFWQcXnhRFEQe5HeFroPaEghlnqy7F5E2J3Fsab189ondqUzcjwSVi7el7F36cr6PvQYXoZ1P2F5CSF2/azeMQ=="
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz",
|
||||
@@ -14741,11 +14735,6 @@
|
||||
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||
"dev": true
|
||||
},
|
||||
"raven-js": {
|
||||
"version": "3.27.2",
|
||||
"resolved": "https://registry.npmjs.org/raven-js/-/raven-js-3.27.2.tgz",
|
||||
"integrity": "sha512-mFWQcXnhRFEQe5HeFroPaEghlnqy7F5E2J3Fsab189ondqUzcjwSVi7el7F36cr6PvQYXoZ1P2F5CSF2/azeMQ=="
|
||||
},
|
||||
"raw-body": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz",
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
"moment": "^2.27.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"popper.js": "^1.16.1",
|
||||
"raven-js": "^3.27.2",
|
||||
"uglify-js": "^3.12.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% load static %}
|
||||
{% load raven %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
@@ -22,8 +21,6 @@
|
||||
|
||||
<script src="{% static 'js/jquery.js' %}"></script>
|
||||
<script src="{% static 'js/popper.js' %}"></script>
|
||||
<script src="{% static 'js/raven.js' %}"></script>
|
||||
<script>Raven.config('{% sentry_public_dsn %}').install()</script>
|
||||
{% block preload_js %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
{% load static %}
|
||||
{% load raven %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% load static %}
|
||||
{% load raven %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
@@ -14,10 +13,6 @@
|
||||
<link href="{% static 'fonts/OpenSans-Regular.tff' %}">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/screen.css' %}">
|
||||
|
||||
<script src="{% static 'js/raven.js' %}"></script>
|
||||
<script>Raven.config('{% sentry_public_dsn %}').install()</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user