Skip to content

Commit

Permalink
Increase metrics post request timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
niemijoe committed Sep 13, 2022
1 parent b36fece commit be05ea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion send_data_to_azure_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit be05ea6

Please sign in to comment.