-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
azure-log-analytics-data-collector/lib/azure/loganalytics/datacollectorapi/client.rb
Lines 58 to 71 in c9a05ca
| res = RestClient.post( uri, body, headers) | |
| res | |
| rescue => e | |
| c = e.response.code.to_i | |
| if c == 429 || c == 500 || c==503 | |
| if retries < @max_retries | |
| retries += 1 | |
| sleep(@retry_sleep_period) | |
| retry | |
| end | |
| end | |
| raise e | |
| end | |
| end |
res can be nil here, leading to a scenario where the following is logged from the logstash-output-azure_loganalytics plugin when Azure::Loganalytics::Datacollectorapi::Client.is_success(res) is called and is_success attempts to evaluate res.codefrom logstash:
[ERROR][logstash.outputs.azureloganalytics][pipeline-common][pipeline_common_output_azure_log_analytics_ingest] Exception occured in posting to DataCollector API as log type ExampleLogType: 'undefined method `code' for nil:NilClass', data=>[{"original_timestamp":"2021-04-15T10:36:21.315Z","event_uuid":"ede25ed2-0d3e-4898-8c5d-3...There appears to be a related issue logged at rest-client/rest-client#655
Metadata
Metadata
Assignees
Labels
No labels