sentry-telegram
sentry-telegram copied to clipboard
Does not work properly with Sentry onpremise 20.9.0
After migrating from version 8.22 to 20.9.0 sentry-telegram plugin no longer inserts {message} from issues into message body. Messages sent by "Test Plugin" button are delivered correctly with {message}. But messages from "real" alerts are delivered with empty {message} name. As I understand it, this problem is related to changes in Sentry SDK.
def build_message(self, group, event): the_tags = defaultdict(lambda: '[NA]') the_tags.update({k:v for k, v in event.tags}) names = { 'title': event.title, 'tag': the_tags, 'message': event.message, <---- no longer work for issues in last versions. 'project_name': group.project.name, 'url': group.get_absolute_url(), }
Try installing sentry by using Python2 instead of Python3 (which is default for some time):
SENTRY_PYTHON2=1 ./install.sh
Then the plugin should work.
Or try this fix - https://github.com/butorov/sentry-telegram/pull/41
I have not tested solution with Python2. But I'm afraid it doesn't make sense anymore, because: "Sentry uses Python 3 by default since December 4th, 2020 and Sentry 21.1.0 is the last version to support Python 2."
Try installing sentry by using Python2 instead of Python3 (which is default for some time):
Python 2 R.I.P
@Olegt0rr in this case telegram plugin won't work for you.
There is a fix for python 3.6+ - https://github.com/butorov/sentry-telegram/pull/41