mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
use ne sentry sdk instead of raven
This commit is contained in:
parent
e0416ceacd
commit
df0982dd80
4 changed files with 8 additions and 36 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
# -*- 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()
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<!-- 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue