getsentry / getsentry/sentry-python

Add timeout `status` to http spans.

Đang mở
#2,091 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Feature Python Spans
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ả

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

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.