From be05ea6c54d6d9c8a529014963d185a90086686d Mon Sep 17 00:00:00 2001 From: niemijoe Date: Tue, 13 Sep 2022 11:52:57 +0300 Subject: [PATCH] Increase metrics post request timeout --- send_data_to_azure_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send_data_to_azure_monitor.py b/send_data_to_azure_monitor.py index eecbb85..f64f4d7 100644 --- a/send_data_to_azure_monitor.py +++ b/send_data_to_azure_monitor.py @@ -35,7 +35,7 @@ def send_custom_metrics_request(custom_metric_json, attempts_remaining): request_url = f'https://westeurope.monitoring.azure.com/{MONITOR_DATA_COLLECTOR_RESOURCE_ID}/metrics' headers = {'Content-type': 'application/json', 'Authorization': f'Bearer {existing_access_token}'} - response = requests.post(request_url, data=custom_metric_json, headers=headers, timeout=10) + response = requests.post(request_url, data=custom_metric_json, headers=headers, timeout=60) # Return if response is successful if response.status_code == 200: