use ne sentry sdk instead of raven

parent e0416cea
Pipeline #1717 failed with stages
in 8 minutes and 35 seconds
......@@ -128,8 +128,13 @@ def create_app(conf=None, verbose=0, logfile=None, **kwargs):
SENTRY_AVAILABLE = False
if app.demo:
try:
from .ext.sentry import sentry
sentry.init_app(app, dsn=app.config['BUI_DSN'])
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
sentry_sdk.init(
dsn=app.config['BUI_DSN'],
integrations=[FlaskIntegration()]
)
SENTRY_AVAILABLE = True
except ImportError:
pass
......@@ -425,14 +430,4 @@ def create_app(conf=None, verbose=0, logfile=None, **kwargs):
session_manager.delete_session()
return response
if app.demo and SENTRY_AVAILABLE:
@app.errorhandler(500)
def internal_server_error(error):
from .ext.sentry import sentry
return render_template(
'500_sentry.html',
event_id=g.sentry_event_id,
public_dsn=sentry.client.get_public_dsn('https')
)
return app
# -*- coding: utf8 -*-
"""
.. module:: burpui.ext.sentry
:platform: Unix
:synopsis: Burp-UI external Sentry module.
.. moduleauthor:: Ziirish <hi+burpui@ziirish.me>
"""
from raven.contrib.flask import Sentry
sentry = Sentry()
<!-- Sentry JS SDK 2.1.+ required -->
<script src="https://cdn.ravenjs.com/2.3.0/raven.min.js"></script>
{% if event_id %}
<script>
Raven.showReportDialog({
eventId: '{{ event_id }}',
dsn: '{{ public_dsn }}'
});
</script>
{% endif %}
......@@ -30,7 +30,7 @@ appStart () {
echo "$TIMEZONE" >/etc/timezone
}
pip install "raven[flask]"
pip install "sentry-sdk[flask]"
cp ${CONFIG_DIR}/burp-ui/burpui.cfg /etc/burp/burpui.cfg
rand=$(dd if=/dev/urandom bs=256 count=1 2>/dev/null | base64 | sed ':a;N;$!ba;s/\n//g')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment