hoss-agent 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hoss/config.rb +4 -2
- data/lib/hoss/spies/http.rb +1 -1
- data/lib/hoss/transport/worker.rb +5 -1
- data/lib/hoss/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52937879f958d6e6a236623c9bcd300691e17bd0a2b6e6fbb803d2b13a4c95c1
|
4
|
+
data.tar.gz: d3c30d60effbe130e39b0a3b0e4f58e108a841423a41131c07cf3cb15bf20fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37785ed4764dd337540b7857eda33e42f2be0062876461b7b388c37246a17d4ded2bbe5b45d046c8f2854d0bae1ec6036d7283b1402ee4a6739fe9171c836388
|
7
|
+
data.tar.gz: bd0e9a79739a1ac79ab2aa5d3d8f2d0b65cd8b0834ba94261e1b00859863100ac088b6ddbc05133baa733521ebe07032cf989f0e19b0d3022d42b78e38ea36fa
|
data/lib/hoss/config.rb
CHANGED
@@ -41,7 +41,7 @@ module Hoss
|
|
41
41
|
option :remote_config_fetch_interval, type: :int, default: 300
|
42
42
|
option :agentConfig, type: :dict
|
43
43
|
option :debug, type: :boolean, default: ENV['HOSS_DEBUG']
|
44
|
-
|
44
|
+
option :disable_reporting, type: :boolean, default: ENV['HOSS_DISABLE_REPORTING'] == 'true'
|
45
45
|
|
46
46
|
option :central_config, type: :bool, default: true
|
47
47
|
option :capture_body, type: :string, default: 'off'
|
@@ -109,7 +109,9 @@ module Hoss
|
|
109
109
|
)
|
110
110
|
end
|
111
111
|
|
112
|
-
|
112
|
+
unless self.disable_reporting.nil?
|
113
|
+
self.disable_reporting = self.disable_reporting == 'true' || self.disable_reporting == true
|
114
|
+
end
|
113
115
|
|
114
116
|
yield self if block_given?
|
115
117
|
|
data/lib/hoss/spies/http.rb
CHANGED
@@ -58,7 +58,7 @@ module Hoss
|
|
58
58
|
event.response.received_at = DateTime.now.strftime('%Q').to_i
|
59
59
|
event.response.status_code = result.code.to_i
|
60
60
|
result.headers.each {|n,v| event.response.headers[n] = v}
|
61
|
-
event.response.body = result.body.
|
61
|
+
event.response.body = result.body.to_s
|
62
62
|
end
|
63
63
|
result
|
64
64
|
rescue HTTP::TimeoutError => e
|
@@ -147,7 +147,11 @@ module Hoss
|
|
147
147
|
puts json if config.debug
|
148
148
|
end
|
149
149
|
begin
|
150
|
-
|
150
|
+
if config.disable_reporting
|
151
|
+
debug "Reprting disabled, skipping"
|
152
|
+
else
|
153
|
+
connection.write(json)
|
154
|
+
end
|
151
155
|
rescue Exception => e
|
152
156
|
error format('Failed send report: %s %s', e.inspect, e.backtrace)
|
153
157
|
batch.each do |m|
|
data/lib/hoss/version.rb
CHANGED