getsentry / getsentry/sentry-python

Add file name and line number to logentry

Abierto
#2,779 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Feature Python
Lenguaje dominante
Python
Estrellas
2.2k
Forks
669
Merge medio
1 d 1 h
PR fusionados (30 d)
213

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.