Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Requested timeout for listing and searching monitors.

Open
#2,466 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start by reproducing the timeout with MonitorsApi.list_monitors() and search_monitors(), both with and without filters and pagination. Then inspect the Configuration request_timeout parameter and how APIClient uses it for these calls. Done means explaining the timeout behavior and documenting or correcting the configuration path if it does not work as described.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
166
Forks
55
Avg merge
2d 17h
Merged PRs (30d)
73

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DataDog/datadog-api-client-python

All issues in DataDog/datadog-api-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.