getsentry / getsentry/sentry-python
Add timeout `status` to http spans.
Offen
Feature
Python
Spans
- Vorherrschende Sprache
- Python
- Sterne
- 2.2k
- Forks
- 669
- Ø Merge
- 1 T. 1 Std.
- Gemergte PRs (30 T.)
- 213
Beschreibung
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
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.