diff options
| author | 2020-12-20 20:43:35 +0200 | |
|---|---|---|
| committer | 2020-12-20 20:43:35 +0200 | |
| commit | 1cdcd2370f9102cb42a291e78fff5ba076651d32 (patch) | |
| tree | 183cb063c8b63c60a8d66e8dfb0fe694cc380e19 /bot | |
| parent | Merge pull request #535 from python-discord/sebastiaan/advent-of-code/refacto... (diff) | |
| parent | Fix wrong way for getting Git SHA (diff) | |
Merge pull request #547 from python-discord/ks123/sentry
Sentry SDK version bump, integrations adding and Sentry release workflow
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/__main__.py | 9 | ||||
| -rw-r--r-- | bot/constants.py | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/bot/__main__.py b/bot/__main__.py index cd2d43a9..e9b14a53 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -2,9 +2,10 @@ import logging import sentry_sdk from sentry_sdk.integrations.logging import LoggingIntegration +from sentry_sdk.integrations.redis import RedisIntegration from bot.bot import bot -from bot.constants import Client, STAFF_ROLES, WHITELISTED_CHANNELS +from bot.constants import Client, GIT_SHA, STAFF_ROLES, WHITELISTED_CHANNELS from bot.utils.decorators import in_channel_check from bot.utils.extensions import walk_extensions @@ -16,7 +17,11 @@ sentry_logging = LoggingIntegration( sentry_sdk.init( dsn=Client.sentry_dsn, - integrations=[sentry_logging] + integrations=[ + sentry_logging, + RedisIntegration() + ], + release=f"sir-lancebot@{GIT_SHA}" ) log = logging.getLogger(__name__) diff --git a/bot/constants.py b/bot/constants.py index 5e97fa2d..0325066a 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -313,6 +313,8 @@ WHITELISTED_CHANNELS = ( Channels.sprint_documentation, ) +GIT_SHA = environ.get("GIT_SHA", "foobar") + # Bot replies ERROR_REPLIES = [ "Please don't do that.", |