Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Requested timeout for listing and searching monitors.

Đang mở
#2,466 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

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ả

kind/bug stale

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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DataDog/datadog-api-client-python

Tất cả issue của DataDog/datadog-api-client-python

Issue tương tự

Thêm issue về Python

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.