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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 722e5fcda718182f47faa927fbfd9f19b96567d472eaa0f929bef3982b6024a3
4
- data.tar.gz: f009f58f3659233bd2cb88670698e8cbcf382d85602abb0d898b3a49a0395d34
3
+ metadata.gz: 52937879f958d6e6a236623c9bcd300691e17bd0a2b6e6fbb803d2b13a4c95c1
4
+ data.tar.gz: d3c30d60effbe130e39b0a3b0e4f58e108a841423a41131c07cf3cb15bf20fc0
5
5
  SHA512:
6
- metadata.gz: a9ba92e08cbfb0a6daa8fcb30b2d6dc88b37e7ea1ed426197982c0a23df7df493737925b1cc56d7c6f53baa4a72495db4b9241b6d49aa91a7c10afffdc3ddc65
7
- data.tar.gz: 55b09ee50f6e2c85ba683678de3f2216ceafff367a1e6aa89526ae359ae5b565aa7565e20356ba5b3e0ea5c1b3bb27360e5b288069065aec390c468dbdfbe281
6
+ metadata.gz: 37785ed4764dd337540b7857eda33e42f2be0062876461b7b388c37246a17d4ded2bbe5b45d046c8f2854d0bae1ec6036d7283b1402ee4a6739fe9171c836388
7
+ data.tar.gz: bd0e9a79739a1ac79ab2aa5d3d8f2d0b65cd8b0834ba94261e1b00859863100ac088b6ddbc05133baa733521ebe07032cf989f0e19b0d3022d42b78e38ea36fa
@@ -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
- warn '[HOSS] No API Key provided' unless self.api_key
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
 
@@ -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.dup.to_s
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
- connection.write(json)
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|
@@ -18,5 +18,5 @@
18
18
  # frozen_string_literal: true
19
19
 
20
20
  module Hoss
21
- VERSION = '1.0.6'
21
+ VERSION = '1.0.7'
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoss-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Cooper