getsentry / getsentry/sentry-python

Add file name and line number to logentry

未關閉
#2,779 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Feature Python
主要語言
Python
星號
2.2k
分支
669
平均合併
1 天 40 分鐘
30 天內合併 PR
212

描述

### Problem Statement

I want more metadata in `logentry` so I can create GitHub/GitLab links from the Issue Details page.

### Solution Brainstorm

logentry [1] does not have enough metadata to create a link back to GitHub. If you add the file name and line number it would be sufficient for me.

For instance, [this issue](https://sentry.sentry.io/issues/4957163612/?project=1&query=start%3D2024-02-29T06%3A48%3A00%26end%3D2024-02-29T09%3A19%3A00%26groupStatsPeriod%3Dauto&referrer=alerts-related-issues-issue-stream) shows this under `Message`:
image

If I had the extra metadata, I could create a hyperlink to this line (which is where the error is raised):
https://github.com/getsentry/sentry/blob/817cc75c6f22bdfcd05bc08cafdb6e89046e1e41/src/sentry/utils/safe.py#L43

[1]
```
"logentry": {
"message": "%s.process_error",
"formatted": "send_notification.process_error",
"params": [
"send_notification"
]
},
```

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。