GithubHelp home page GithubHelp logo

neko-design / sentry-msteams Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 3.0 301 KB

Microsoft Teams Integration for Sentry

License: Apache License 2.0

Python 100.00%
alerts microsoft-teams notifications python sentry sentry-plugin

sentry-msteams's People

Contributors

bogdan-calapod avatar neko-design avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sentry-msteams's Issues

Error Loading in Sentry 9.0

Jul 15 01:51:37 us-east-2 sentry[25552]: Traceback (most recent call last):
Jul 15 01:51:37 us-east-2 sentry[25552]:   File "/www/sentry/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 32, in re
Jul 15 01:51:37 us-east-2 sentry[25552]:     plugin = ep.load()
Jul 15 01:51:37 us-east-2 sentry[25552]:   File "/www/sentry/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2434, in loa
Jul 15 01:51:37 us-east-2 sentry[25552]:     return self.resolve()
Jul 15 01:51:37 us-east-2 sentry[25552]:   File "/www/sentry/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2440, in res
Jul 15 01:51:37 us-east-2 sentry[25552]:     module = __import__(self.module_name, fromlist=['__name__'], level=0)
Jul 15 01:51:37 us-east-2 sentry[25552]:   File "/www/sentry/local/lib/python2.7/site-packages/msteams/plugin.py", line 8, in <module>
Jul 15 01:51:37 us-east-2 sentry[25552]:     from sentry_plugins.base import CorePluginMixin
Jul 15 01:51:37 us-east-2 sentry[25552]: ImportError: No module named sentry_plugins.base

It would seem that this plugin no longer works in sentry 9.0

Stack Trace when Alert Fires

Received an email from Christian regarding an issue when an alert should be sent. Creating an issue to track it down :)

Plugin doesn't show in list of integrations after install on Sentry 10

Sentry OnPremise Version 10 running on Docker

I've added the plugin to the requirements.txt file and done a rebuild - I can see that the python package is pulled in and apparently installed, but I'm unable to actually see the plugin in the Sentry application under 'integrations' where I'd expect it to be.

Any idea what I can to fix or even debug what the issue may be?

Thank you

Failed to load plugin 'msteams':

Hello,

I just upgraded to sentry 9.0.0 and tried to install this plugin. Unfortunately that was not successfull:

Failed to load plugin 'msteams':
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py", line 31, in register_plugins
plugin = ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2331, in load
self.require(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2354, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 786, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)

any ideas?

Thanks,
Michael

Installing plugin yields Internal Error when using "Test plugin"

Heya,

i just tried adding the plugin to our sentry on premise installation. I could install fine and it shows up in the WebUI. However when i hit "Test plugin" i am getting:

Test Results
"There was an internal error with the Plugin, notify() got an unexpected keyword argument 'raise_exception'"

Any ideas or pointers would be appreciated. This was tested with sentry-msteams 0.7.0 off pypi and the latest tag on getsentry/sentry which reports 10.1.0.dev0 in the UI

bug: 'Event' object has no attribute 'message_short'

Bug Report

Version:

  • Sentry 10 On-Premise
  • sentry-msteams 0.6.0

Current behavior:
No messages can be sent, instead the following error message is logged: AttributeError: 'Event' object has no attribute 'message_short'

Expected behavior:
Sending messages without an error

Steps to reproduce:

  1. clone https://github.com/getsentry/onpremise
  2. add sentry-msteams to sentry/requirements.txt
  3. run ./install.sh
  4. run docker-compose up -d
  5. create new project, add and enable Microsoft Teams integration
  6. add teams webhook url
  7. click on Test Plugin
  8. run docker container logs --tail 100 sentry_onpremise_web_1 to get log entry

Related code:

AttributeError: 'Event' object has no attribute 'message_short'
  File "sentry/api/endpoints/project_plugin_details.py", line 58, in post
    test_results = plugin.test_configuration(project)
  File "sentry/plugins/bases/notify.py", line 164, in test_configuration
    return self.notify(notification)
  File "msteams/plugin.py", line 64, in notify
    title = event.message_short.encode('utf-8')

Other information:
image

Test plugin works but no alerts received

Hi again,

We receive events successfuly when using the "test plugin" button, but real events are never received. Created an alert rule that triggers for every single event for msteams but nothing comes in.

Sentry version: 9.1.2
Python version: 2.7

Seeing the below in logs, not sure if this is the problem. (xxxxx = omitted data)

Jul 29 12:56:37 lp130sentry01 sentry[446]:   File "/home/sentry/.local/lib/python2.7/site-packages/sentry/rules/actions/notify_event_service.py", line 67, in after
Jul 29 12:56:37 lp130sentry01 sentry[446]:     plugin = plugins.get(service)
Jul 29 12:56:37 lp130sentry01 sentry[446]:   File "/home/sentry/.local/lib/python2.7/site-packages/sentry/plugins/base/manager.py", line 62, in get
Jul 29 12:56:37 lp130sentry01 sentry[446]:     raise KeyError(slug)
Jul 29 12:56:37 lp130sentry01 sentry[446]: KeyError: u'msteams'
Jul 29 12:56:37 lp130sentry01 sentry[446]: 10:56:37 [ERROR] celery.worker.job: Task sentry.tasks.post_process.post_process_group[xxxxx] raised unexpected: KeyError(u'msteams',) (data={u'hostname': 'celery@lp130sentry01', u'name': 'sentry.tasks.post_process.post_process_group', u'args': '[]', u'internal': False, u'kwargs': "{'event': <Event at 0x7f55dad7f690: id=None, project_id=17L, group_id=924323L>, 'is_new_group_environment': False, 'is_new': False, 'primary_hash': '61221137e843f95799918edf12b3d399', 'is_sample': True, 'is_regression': None}", u'id': 'xxxxx'})

UnsupportedMediaTypeException when testing

On some (not all) of our sentry projects, we see the following error when testing:

Test Results:
["System.Net.Http.UnsupportedMediaTypeException: No MediaTypeFormatter is available to read an object of type 'JToken' from conten","t with media type 'application/octet-stream'."]

(webhook URL omitted)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.