mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
integrations: Add support for Rails backend in Sentry Integration.
(cherry picked from commit 142e455d81
)
This commit is contained in:
committed by
Alex Vandiver
parent
c7839ff084
commit
d026f35c5b
1049
zerver/webhooks/sentry/fixtures/event_for_exception_rails.json
Normal file
1049
zerver/webhooks/sentry/fixtures/event_for_exception_rails.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -82,6 +82,35 @@ Traceback:
|
||||
```"""
|
||||
self.check_webhook("event_for_exception_python", expected_topic, expected_message)
|
||||
|
||||
def test_event_for_exception_rails(self) -> None:
|
||||
expected_topic = "ZeroDivisionError: divided by 0"
|
||||
expected_message = """\
|
||||
**New exception:** [ZeroDivisionError: divided by 0](https://sentry.io/organizations/nitk-46/issues/4213933362/events/49b528e13e45497ab9adc3173fd2ed34/)
|
||||
```quote
|
||||
**level:** error
|
||||
**timestamp:** 2023-05-29 10:12:33
|
||||
**filename:** app/controllers/articles_controller.rb
|
||||
```
|
||||
|
||||
Traceback:
|
||||
```ruby
|
||||
class ArticlesController < ApplicationController
|
||||
|
||||
def index
|
||||
|
||||
begin
|
||||
|
||||
---> 132312 / 0
|
||||
|
||||
rescue ZeroDivisionError => exception
|
||||
|
||||
Sentry.capture_exception(exception)
|
||||
|
||||
end
|
||||
|
||||
```"""
|
||||
self.check_webhook("event_for_exception_rails", expected_topic, expected_message)
|
||||
|
||||
def test_webhook_event_for_exception_python(self) -> None:
|
||||
expected_topic = "ValueError: new sentry error."
|
||||
expected_message = """\
|
||||
|
@@ -77,6 +77,7 @@ syntax_highlight_as_map = {
|
||||
"javascript": "javascript",
|
||||
"node": "javascript",
|
||||
"python": "python3",
|
||||
"ruby": "ruby",
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user