Requested timeout for listing and searching monitors.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo il timeout con MonitorsApi.list_monitors() e search_monitors(), sia con filtri e paginazione sia senza. Poi esamina il parametro request_timeout di Configuration e il modo in cui APIClient lo utilizza per queste chiamate. Il lavoro è completato quando viene spiegato il comportamento del timeout e il percorso di configurazione viene documentato o corretto se non funziona come descritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 166
- Fork
- 55
- Merge medio
- 2g 17h
- PR unite (30g)
- 73
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DataDog/datadog-api-client-python
-
stale
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
DataDog/datadog-api-client-python#3535 · 1 commento ·
-
kind/bug stale
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
DataDog/datadog-api-client-python#3717 · 3 commenti ·
-
kind/bug stale
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
DataDog/datadog-api-client-python#3656 · 1 commento ·
-
kind/bug stale
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
DataDog/datadog-api-client-python#3120 · 1 commento ·
-
stale
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
DataDog/datadog-api-client-python#2986 · 1 commento ·
Tutte le issue di DataDog/datadog-api-client-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·