sentry-telegram icon indicating copy to clipboard operation
sentry-telegram copied to clipboard

Does not work properly with Sentry onpremise 20.9.0

Open kona-automacon opened this issue 5 years ago • 4 comments
trafficstars

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(), }

kona-automacon avatar Sep 08 '20 09:09 kona-automacon

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

gituser avatar Dec 21 '20 10:12 gituser

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."

kona-automacon avatar Jan 23 '21 09:01 kona-automacon

Try installing sentry by using Python2 instead of Python3 (which is default for some time):

Python 2 R.I.P

Olegt0rr avatar Jan 25 '21 08:01 Olegt0rr

@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

gituser avatar Feb 25 '21 12:02 gituser