getsentry / getsentry/sentry-python

Add file name and line number to logentry

Đang mở
#2,779 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Feature Python
Ngôn ngữ chính
Python
Star
2.2k
Fork
669
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
213

Mô tả

### 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"
]
},
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.