Requested timeout for listing and searching monitors.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện timeout với MonitorsApi.list_monitors() và search_monitors(), cả khi có và khi không có bộ lọc và phân trang. Sau đó, kiểm tra tham số request_timeout của Configuration và cách APIClient sử dụng tham số này cho các lệnh gọi đó. Công việc được xem là hoàn tất khi hành vi timeout được giải thích và đường dẫn cấu hình được ghi lại hoặc sửa nếu không hoạt động như mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have some concerns about how the datadog-api-client library interacts with the Datadog API.
Specifically, in the case of monitors, when calling the list_monitors() function (https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.api.html#datadog_api_client.v1.api.monitors_api.MonitorsApi.list_monitors), we receive a Requested timeout error after approximately 10 seconds.
The same happens with search_monitors() (https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.api.html#datadog_api_client.v1.api.monitors_api.MonitorsApi.search_monitors).
I understand that the timeout occurs because the API call returns a very large dataset and exceeds the allowed time. If we use "filters" in the API requests and the response dataset is small, the timeout does not occur. Goes very well.
We are using pagination in these functions like:
while True:
monitors = self.monitors_api.list_monitors(
name=monitor_name,
monitor_tags=tags,
page=page,
page_size=page_size,
with_downtimes=True
)
if not monitors:
break
all_monitors.extend(monitors)
page += 1
time.sleep(1)
However, the timeout duration appears to remain the same.
We also pass the Configuration object to the Datadog API client (APIClient), including the request_timeout parameter (https://datadog-api-client.readthedocs.io/en/latest/datadog_api_client.v1.html#datadog_api_client.v1.Configuration), but the timeout behavior still seems unchanged.
Could you have some information about how the datadog-api-client call timeout works and whether it is possible to modify it?
Thank you very much.
- Ngôn ngữ chính
- Python
- Star
- 166
- Fork
- 55
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 73
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/datadog-api-client-python
-
stale
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
DataDog/datadog-api-client-python#3535 · 1 bình luận ·
-
kind/bug stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
DataDog/datadog-api-client-python#3717 · 3 bình luận ·
-
kind/bug stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
DataDog/datadog-api-client-python#3656 · 1 bình luận ·
-
kind/bug stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
DataDog/datadog-api-client-python#3120 · 1 bình luận ·
-
stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
DataDog/datadog-api-client-python#2986 · 1 bình luận ·
Tất cả issue của DataDog/datadog-api-client-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·