getsentry / getsentry/sentry-python

Add timeout `status` to http spans.

Open
#2,091 1 comment 0 reactions 0 assignees View on GitHub
Feature Python Spans
Dominant language
Python
Stars
2.2k
Forks
669
Avg merge
1d 1h
Merged PRs (30d)
213

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.