Remove sentry for now

This commit is contained in:
Jeremy Zhang 2018-12-30 20:55:24 +00:00
parent 4f27dedd6f
commit 0f60152e63
3 changed files with 16 additions and 16 deletions

View File

@ -4,8 +4,8 @@ from titanembeds.commands import Commands
from titanembeds.socketio import SocketIOInterface
from titanembeds.poststats import DiscordBotsOrg, BotsDiscordPw
from collections import deque
from raven import Client as RavenClient
import raven
# from raven import Client as RavenClient
# import raven
import discord
import aiohttp
import asyncio
@ -16,10 +16,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime
handler = logging.FileHandler(config.get("logging-location", "titanbot.log"))
logging.getLogger('TitanBot')
logging.getLogger('sqlalchemy')
try:
raven_client = RavenClient(config["sentry-dsn"])
except raven.exceptions.InvalidDsn:
pass
# try:
# raven_client = RavenClient(config["sentry-dsn"])
# except raven.exceptions.InvalidDsn:
# pass
class Titan(discord.AutoShardedClient):
def __init__(self):

View File

@ -14,7 +14,7 @@ except:
from .database import db
from flask import Flask, render_template, request, session, url_for, redirect, jsonify, g
from flask_sslify import SSLify
from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list, sentry
from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list#, sentry
from .blueprints import api, user, admin, embed, gateway
import os
from titanembeds.database import get_administrators_list
@ -35,7 +35,7 @@ app.config['REDIS_URL'] = config["redis-uri"]
app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # Limit upload size to 4mb
app.secret_key = config['app-secret']
sentry.init_app(app)
#sentry.init_app(app)
db.init_app(app)
rate_limiter.init_app(app)
if config.get("enable-ssl", False):
@ -95,9 +95,9 @@ def context_processor():
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1))))
}
@app.errorhandler(500)
def internal_server_error(error):
return render_template('500.html.j2',
event_id=g.sentry_event_id,
public_dsn=sentry.client.get_public_dsn('https')
), 500
# @app.errorhandler(500)
# def internal_server_error(error):
# return render_template('500.html.j2',
# event_id=g.sentry_event_id,
# public_dsn=sentry.client.get_public_dsn('https')
# ), 500

View File

@ -7,7 +7,7 @@ from flask_babel import Babel
from flask_redis import FlaskRedis
from config import config
from sqlalchemy import and_
from raven.contrib.flask import Sentry
#from raven.contrib.flask import Sentry
import random
import string
import hashlib
@ -370,7 +370,7 @@ def is_int(specimen):
rate_limiter = Limiter(key_func=get_client_ipaddr) # Default limit by ip address
socketio = SocketIO(engineio_logger=config.get("engineio-logging", False))
babel = Babel()
sentry = Sentry(dsn=config.get("sentry-dsn", None))
#sentry = Sentry(dsn=config.get("sentry-dsn", None))
@socketio.on_error_default # disconnect on all errors
def default_socketio_error_handler(e):