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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d2aef92d46683f54c8befeb66a9576768b9d57170cbb7ac6e38a7a3ce1f93dc
|
4
|
+
data.tar.gz: 53ec0b9e2a27e1af01a4ea75e6ea8ac5bf5ff72c83869916e3892eb154a6283c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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})
|
26
|
+
@logger.warn("Problem (#{exception.inspect}) while sending message(s) to Service Bus. Retrying...")
|
27
27
|
else
|
28
|
-
@logger.warn("Problem (HTTP #{env.status})
|
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
|
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("
|
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.
|
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'
|