getsentry / getsentry/sentry-python

Add timeout `status` to http spans.

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

Descripción

Based on a slack thread - here's a snippet from @gggritso about behaviour that he would like to see for timeouts.
```python
import urllib
import urllib.request

try:
response = urllib.request.urlopen('http://python.org/', timeout=0.0001)
html = response.read()
except urllib.error.URLError as e:
print("URL Error", e.reason)
if (e.reason == 'timed out'):
span['status'] = 'time out'
raise e
```

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.