Skip to content

Commit a9cfdb6

Browse files
authored
Merge pull request #59 from avrae/AVR-809
Remove Sentry
2 parents 3b77437 + 455adc7 commit a9cfdb6

3 files changed

Lines changed: 0 additions & 20 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ These environment variables are optional:
5757

5858
- `FR_APPROVE_THRESHOLD` (default 5) - The minimum score for feature requests to be added to GitHub.
5959
- `FR_DENY_THRESHOLD` (default -3) - The score for feature requests to be automatically closed if they fall under it.
60-
- `SENTRY_DSN` - DSN for [Sentry](https://sentry.io/welcome/).
6160

6261
## Running the bot
6362

bot.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from math import floor, isfinite
77

88
import disnake
9-
import sentry_sdk
109
from disnake import Intents
1110
from disnake.ext import commands
1211
from disnake.ext.commands import CheckFailure, CommandInvokeError, CommandNotFound, UserInputError
@@ -18,21 +17,12 @@
1817
ORG_NAME = os.environ.get("ORG_NAME", "avrae")
1918
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
2019
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
21-
SENTRY_DSN = os.getenv('SENTRY_DSN') or None
2220

2321

2422
class Taine(commands.AutoShardedBot):
2523
def __init__(self, *args, **kwargs):
2624
super(Taine, self).__init__(*args, **kwargs)
2725

28-
if SENTRY_DSN is not None:
29-
sentry_sdk.init(dsn=SENTRY_DSN, environment="Production")
30-
31-
@staticmethod
32-
def log_exception(exception=None):
33-
if SENTRY_DSN is not None:
34-
sentry_sdk.capture_exception(exception)
35-
3626

3727
intents = Intents.all()
3828
bot = Taine(
@@ -69,10 +59,6 @@ async def on_command_error(ctx, error):
6959
if isinstance(error, CommandInvokeError):
7060
error = error.original
7161

72-
# send error to sentry.io
73-
if not isinstance(error, (ReportException, UserInputError, CheckFailure)):
74-
bot.log_exception(error)
75-
7662
await ctx.message.channel.send(f"Error: {error}")
7763
for line in traceback.format_exception(type(error), error, error.__traceback__):
7864
log.warning(line)
@@ -83,10 +69,6 @@ async def on_slash_command_error(inter, error):
8369
if isinstance(error, CommandInvokeError):
8470
error = error.original
8571

86-
# send error to sentry.io
87-
if not isinstance(error, (ReportException, UserInputError, CheckFailure)):
88-
bot.log_exception(error)
89-
9072
await inter.response.send_message(f"Error: {error}")
9173
for line in traceback.format_exception(type(error), error, error.__traceback__):
9274
log.warning(line)

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ disnake[discord]==2.2.1
44
fuzzywuzzy[speedup]==0.18.0
55
PyGithub==1.55
66
python-Levenshtein==0.12.2
7-
sentry-sdk==1.4.3
87

98
# Datadog support
109
ddtrace~=2.8.2

0 commit comments

Comments
 (0)