logstash-output-azure_service_bus 0.3.4 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3ec4e870e1468a85580e2818896b9469a4113e8f6a021b1dd2b3e499b81a624
4
- data.tar.gz: 158011583fa027e9976596ce9704c82e30c2507e7a65bd806e5cea7052589103
3
+ metadata.gz: 7d2aef92d46683f54c8befeb66a9576768b9d57170cbb7ac6e38a7a3ce1f93dc
4
+ data.tar.gz: 53ec0b9e2a27e1af01a4ea75e6ea8ac5bf5ff72c83869916e3892eb154a6283c
5
5
  SHA512:
6
- metadata.gz: 1e407a73289679319f6a96c26915f144a1288a0ed09340dc76c9393d57b692eea419024ceec76ad65418171634e1828344a4d4108d0da2be0a1ddbe9a9833ead
7
- data.tar.gz: df7845a5345202913517bc10ddc1233d4b7887a66ad074bf909aab6b70ec51d7527b69391067017f48976bb6016e90bb88703402ec4268da13617ae34afcbdca
6
+ metadata.gz: 5e0843fa7abfd3657d72d2c0b3aa7e295efd13ffb5951df99ed532171a5fd54794566aec412c4b4964862e2b75b737f0132b569eb738b9ff3c71f07e678de8c1
7
+ data.tar.gz: a966cc7fcec4adc49468304d9512c3f7ecd1ee0b890677d39d8eb006b16ace570a0bb4964208ec6797b7e751c979153bd85463585d5b6fe4222cff3246127feb
@@ -18,14 +18,14 @@ class LogStash::Outputs::AzureServiceBus < LogStash::Outputs::Base
18
18
  interval: 1,
19
19
  interval_randomness: 0.5,
20
20
  backoff_factor: 2,
21
- exceptions: [Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::RetriableResponse, Errno::ECONNRESET],
21
+ exceptions: [Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::RetriableResponse, Faraday::SSLError],
22
22
  methods: [], # Empty -> all methods
23
23
  retry_statuses: [401, 403, 404, 410, 429, 500], # https://docs.microsoft.com/en-us/rest/api/servicebus/send-message-batch#response-codes
24
24
  retry_block: lambda do |env, _options, _retries, exception|
25
25
  if env.status.nil?
26
- @logger.warn("Problem (#{exception}) for #{env.method.upcase} #{env.url}")
26
+ @logger.warn("Problem (#{exception.inspect}) while sending message(s) to Service Bus. Retrying...")
27
27
  else
28
- @logger.warn("Problem (HTTP #{env.status}) for #{env.method.upcase} #{env.url}")
28
+ @logger.warn("Problem (HTTP #{env.status}) while sending message(s) to Service Bus. Retrying...")
29
29
  if env.status == 401
30
30
  refresh_access_token
31
31
  env.request_headers['Authorization'] = "Bearer #{@access_token}"
@@ -71,12 +71,12 @@ class LogStash::Outputs::AzureServiceBus < LogStash::Outputs::Base
71
71
  end
72
72
  rescue StandardError => e
73
73
  # Hopefully we never make it here and "throw away" messages since we have an agressive retry strategy.
74
- @logger.error("Error (#{e}) while sending message to Service Bus")
74
+ @logger.error("Error while sending message(s) to Service Bus: #{e.inspect}")
75
75
  else
76
76
  if response.status == 201
77
77
  @logger.debug("Sent #{messages.length} message(s) to Service Bus")
78
78
  else
79
- @logger.error("Error while sending message to Service Bus: HTTP #{response.status}")
79
+ @logger.error("Error while sending message(s) to Service Bus: HTTP #{response.status}")
80
80
  end
81
81
  end
82
82
 
@@ -88,14 +88,14 @@ class LogStash::Outputs::AzureServiceBus < LogStash::Outputs::Base
88
88
  req.options.timeout = 10
89
89
  end
90
90
  rescue StandardError => e # We just catch everything and move on since @service_bus_conn will handle retries.
91
- @logger.error("Error while fetching access token: #{e}")
91
+ @logger.error("Error while fetching access token: #{e.inpsect}")
92
92
  else
93
93
  if response.status == 200
94
94
  data = JSON.parse(response.body)
95
95
  @access_token = data['access_token']
96
96
  @logger.info('Successfully refreshed Azure access token')
97
97
  else
98
- @logger.error("HTTP error when fetching access token: #{response.body}")
98
+ @logger.error("Error while fetching access token: HTTP #{response.status}")
99
99
  end
100
100
  end
101
101
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-azure_service_bus'
3
- s.version = '0.3.4'
3
+ s.version = '0.3.7'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Send Logstash messages to Azure Service Bus.'
6
6
  s.homepage = 'https://github.com/gharryg/logstash-output-azure_service_bus'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-azure_service_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harrison Golden