integrations: Add support for Rails backend in Sentry Integration.

(cherry picked from commit 142e455d81)
This commit is contained in:
Satyam Bansal
2023-05-29 16:17:05 +05:30
committed by Alex Vandiver
parent c7839ff084
commit d026f35c5b
3 changed files with 1079 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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 = """\

View File

@@ -77,6 +77,7 @@ syntax_highlight_as_map = {
"javascript": "javascript",
"node": "javascript",
"python": "python3",
"ruby": "ruby",
}