butorov / sentry-telegram Goto Github PK
View Code? Open in Web Editor NEWPlugin for Sentry which allows sending notification via Telegram messenger.
License: MIT License
Plugin for Sentry which allows sending notification via Telegram messenger.
License: MIT License
Test message is working ok, but when new issue, nothing sent in group chat.
I'm interested in getting notifications for every Sentry error in my project. This appears to be my only hope to notify Sentry errors in Telegram.
However I'd like more detailed documentation on how to set this up. I have no idea where to install this package (somewhere on Sentry or locally, and if locally how would it work).
It would be nice if plugin had some "test settings" action that would try to send test notification (to check, that bot token and receiver ids are correct).
Hi!
I installed the plugin with pip install sentry-telegram
and I can't see it neither in integrations nor in legacy integrations.
Do I have to do anything else?
Best, Yatekii
Currently only event level is displayed.
It would be nice to see at least short error message.
Shows that the is no errors and Test successful, but no messages in telegram.
Hi!
we have several alert rules that trigger telegram notifications.
Is it possible to somehow inject triggered rule name in notification text?
Otherwise it's not clear is it first-time error or threshold error.
Thanks!
Please =)
I have tried my telegram username/ID and group slug, but the bot still be silent. How to debug?
There is an option to install a plugin automatically:
https://github.com/getsentry/sentry-plugins/blob/master/setup.py#L105
# entry_points={
# 'sentry.plugins': [
# 'phabricator = sentry_phabricator.plugins:PhabricatorPlugin'
# ],
# },
# entry_points={
# 'sentry.apps': [
# 'phabricator = sentry_phabricator'
# ],
# },
Hello. Could you please add support for topics? Now it look like impossible to send message not just to general level
Can you update (from 0.2.0) on pypi ?
Hi. Can you check new version sentry 24.5.1 ?
Are there any plans for https://sentry.io/9/ support?
I've got the following error
Test Results: "There was an internal error with the Plugin"
after first test
( bot token and id is correct )
how can i find its log ?
On "Legacy Integration" and on " organization integrations" page your plugin is missing
INSTALLED_APPS
in tuple by default in Sentry, so using INSTALLED_APPS = INSTALLED_APPS + ['sentry_telegram']
(e.g. in sentry.conf.py
in docker-sentry setup) as specified in README leads to the following error:
TypeError: can only concatenate tuple (not "list") to tuple
The Python project telegram can receive normal alerts, but the Django project cannot receive it.
Hi, i have an issue Telegram Notification Error on Sentry Version 24.5.1
web-1 | Traceback (most recent call last):
web-1 | File "/usr/src/sentry/src/sentry/utils/safe.py", line 20, in safe_execute
web-1 | result = func(*args, **kwargs)
web-1 | ^^^^^^^^^^^^^^^^^^^^^
web-1 | TypeError: TelegramNotificationsPlugin.send_message() got an unexpected keyword argument '_with_transaction'
web-1 | 11:09:25 [ERROR] sentry.safe.method: send_message.process_error
Have any idea how to solve it ? one issue have the same problem with me on #60
Thanks.
When using onpremise, there are a lot if services,
This plugin needs to install in which one of them?
sentry_onpremise_nginx_1
sentry_onpremise_relay_1
sentry_onpremise_ingest-consumer_1
sentry_onpremise_subscription-consumer-events_1
sentry_onpremise_post-process-forwarder_1
sentry_onpremise_subscription-consumer-transactions_1
sentry_onpremise_sentry-cleanup_1
sentry_onpremise_cron_1
sentry_onpremise_web_1
sentry_onpremise_worker_1
sentry_onpremise_snuba-cleanup_1
sentry_onpremise_symbolicator-cleanup_1
sentry_onpremise_snuba-consumer_1
sentry_onpremise_snuba-transactions-consumer_1
sentry_onpremise_snuba-api_1
sentry_onpremise_snuba-replacer_1
sentry_onpremise_snuba-outcomes-consumer_1
sentry_onpremise_snuba-subscription-consumer-transactions_1
sentry_onpremise_snuba-subscription-consumer-events_1
sentry_onpremise_snuba-sessions-consumer_1
sentry_onpremise_symbolicator_1
sentry_onpremise_postgres_1
sentry_onpremise_memcached_1
sentry_onpremise_kafka_1
sentry_onpremise_clickhouse_1
sentry_onpremise_redis_1
Related issue
Solution:
In plugin.py
def get_receivers(self, project):
receivers = self.get_option('receivers', project)
if not receivers:
return []
# return filter(bool, receivers.strip().splitlines()) ---------- this line replace with
return list(filter(bool, receivers.strip().splitlines())) # << this line
There are countries that tries to block telegram.
I created PR #19 that add basic proxy support, but there are several issues with that.
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(),
}
Add to requirements.txt
docker-compose up -d --build
Building sentry_web
Step 1/1 : FROM sentry:9.1-onbuild
# Executing 4 build triggers
---> Running in 538350efb466
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting sentry-telegram
Downloading https://files.pythonhosted.org/packages/b1/28/8003f0cfb7c2f107b9eb66fbc1c98d86643005573fcdfd37a3b3037b4d95/sentry_telegram-0.4.0-py2-none-any.whl
Installing collected packages: sentry-telegram
Successfully installed sentry-telegram-0.4.0
docker-compose exec sentry_hard_worker pip install sentry-telegram
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: sentry-telegram in /usr/local/lib/python2.7/site-packages (0.4.0)
docker-compose exec sentry_web pip install sentry-telegram
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: sentry-telegram in /usr/local/lib/python2.7/site-packages (0.4.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.