mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Sentry has client SDKs for many programming languages and frameworks.
Sentry has deprecated their old "Raven" series of client SDKs in favor
of a new series of client SDKs following their unified API format.
As it stood, our Sentry integration was already outdated being written
for the version 5 payloads (the Raven SDKs stopped at version 6 which
is already vastly different from version 5) when the current and
prominently used version is version 7.
This commit completely rewrites the existing Sentry integration.
Tested and supported events:
- Issue created, resolved, assigned, and ignored events.
- "Sentry events" for "capture exception" and "capture message" with
the Golang, Node.js, and Python SDKs (other SDKs should also work but
only these were used for testing).
For reference:
- Old (Raven) SDK for python:
https://github.com/getsentry/raven-python
- New (Unified API format) SDK for python:
https://github.com/getsentry/sentry-python
Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
194 lines
5.5 KiB
JSON
194 lines
5.5 KiB
JSON
{
|
|
"action": "triggered",
|
|
"data": {
|
|
"event": {
|
|
"event_id": "599349254a1447a99774b5310711c1a8",
|
|
"project": 5216640,
|
|
"release": null,
|
|
"dist": null,
|
|
"platform": "python",
|
|
"message": "",
|
|
"datetime": "2020-04-28T13:56:05.903736Z",
|
|
"tags": [
|
|
[
|
|
"level",
|
|
"error"
|
|
],
|
|
[
|
|
"runtime",
|
|
"CPython 3.6.9"
|
|
],
|
|
[
|
|
"runtime.name",
|
|
"CPython"
|
|
],
|
|
[
|
|
"server_name",
|
|
"hp-pavilion"
|
|
]
|
|
],
|
|
"_meta": {
|
|
"exception": {
|
|
"values": {
|
|
"0": {
|
|
"stacktrace": {
|
|
"frames": {
|
|
"0": {
|
|
"vars": {
|
|
"": {
|
|
"len": 11
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"_metrics": {
|
|
"bytes.ingested.event": 1972,
|
|
"bytes.stored.event": 2666
|
|
},
|
|
"contexts": {
|
|
"runtime": {
|
|
"version": "3.6.9",
|
|
"type": "runtime",
|
|
"name": "CPython",
|
|
"build": "3.6.9 (default, Apr 18 2020, 01:56:04) \n[GCC 8.4.0]"
|
|
}
|
|
},
|
|
"culprit": "__main__ in <module>",
|
|
"exception": {
|
|
"values": [
|
|
{
|
|
"stacktrace": {
|
|
"frames": [
|
|
{
|
|
"function": "<module>",
|
|
"abs_path": "/home/hemanth/Desktop/sentry/trigger-exception.py",
|
|
"errors": null,
|
|
"pre_context": [
|
|
"",
|
|
"",
|
|
"if __name__ == \"__main__\":",
|
|
" sentry_sdk.init(dsn=SECRET_DSN)",
|
|
" try:"
|
|
],
|
|
"post_context": [
|
|
" except Exception as e:",
|
|
" sentry_sdk.capture_exception(e)",
|
|
""
|
|
],
|
|
"vars": {
|
|
"__spec__": "None",
|
|
"__builtins__": "<module 'builtins' (built-in)>",
|
|
"__annotations__": {},
|
|
"__file__": "'trigger-exception.py'",
|
|
"__loader__": "<_frozen_importlib_external.SourceFileLoader object at 0x7f9bedf106d8>",
|
|
"__cached__": "None",
|
|
"__name__": "'__main__'",
|
|
"__package__": "None",
|
|
"__doc__": "None",
|
|
"sentry_sdk": "<module 'sentry_sdk' from '/home/hemanth/Desktop/sentry/venv/local/lib/python3.6/site-packages/sentry_sdk/__init__.py'>"
|
|
},
|
|
"package": null,
|
|
"context_line": " raise Exception(\"Custom exception!\")",
|
|
"symbol": null,
|
|
"image_addr": null,
|
|
"module": "__main__",
|
|
"in_app": false,
|
|
"symbol_addr": null,
|
|
"filename": "trigger-exception.py",
|
|
"lineno": 7,
|
|
"colno": null,
|
|
"trust": null,
|
|
"data": {
|
|
"orig_in_app": 1
|
|
},
|
|
"platform": null,
|
|
"instruction_addr": null,
|
|
"raw_function": null
|
|
}
|
|
]
|
|
},
|
|
"type": "Exception",
|
|
"value": "Custom exception!"
|
|
}
|
|
]
|
|
},
|
|
"extra": {
|
|
"sys.argv": [
|
|
"trigger-exception.py"
|
|
]
|
|
},
|
|
"fingerprint": [
|
|
"{{ default }}"
|
|
],
|
|
"grouping_config": {
|
|
"enhancements": "eJybzDhxY3J-bm5-npWRgaGlroGxrpHxBABcTQcY",
|
|
"id": "newstyle:2019-10-29"
|
|
},
|
|
"hashes": [
|
|
"448593f0ce4993462d80e817945a3190"
|
|
],
|
|
"key_id": "1146336",
|
|
"level": "error",
|
|
"location": "trigger-exception.py",
|
|
"logger": "",
|
|
"metadata": {
|
|
"function": "<module>",
|
|
"type": "Exception",
|
|
"value": "Custom exception!",
|
|
"filename": "trigger-exception.py"
|
|
},
|
|
"modules": {
|
|
"wheel": "0.34.2",
|
|
"pkg-resources": "0.0.0",
|
|
"sentry-sdk": "0.14.3",
|
|
"urllib3": "1.25.9",
|
|
"setuptools": "46.1.3",
|
|
"pip": "20.0.2",
|
|
"certifi": "2020.4.5.1"
|
|
},
|
|
"received": 1588082166.991354,
|
|
"sdk": {
|
|
"version": "0.14.3",
|
|
"name": "sentry.python",
|
|
"packages": [
|
|
{
|
|
"version": "0.14.3",
|
|
"name": "pypi:sentry-sdk"
|
|
}
|
|
],
|
|
"integrations": [
|
|
"argv",
|
|
"atexit",
|
|
"dedupe",
|
|
"excepthook",
|
|
"logging",
|
|
"modules",
|
|
"stdlib",
|
|
"threading"
|
|
]
|
|
},
|
|
"timestamp": 1588082165.903736,
|
|
"title": "Exception: Custom exception!",
|
|
"type": "error",
|
|
"version": "7",
|
|
"url": "https://sentry.io/api/0/projects/hypro999-personal-organization/zulip-integration-testing/events/599349254a1447a99774b5310711c1a8/",
|
|
"web_url": "https://sentry.io/organizations/hypro999-personal-organization/issues/1635244907/events/599349254a1447a99774b5310711c1a8/",
|
|
"issue_url": "https://sentry.io/api/0/issues/1635244907/"
|
|
},
|
|
"triggered_rule": "Send a webhook payload to Webhook.site"
|
|
},
|
|
"installation": {
|
|
"uuid": "65027794-169a-4042-80d0-808ece377141"
|
|
},
|
|
"actor": {
|
|
"type": "application",
|
|
"id": "sentry",
|
|
"name": "Sentry"
|
|
}
|
|
}
|