statsd-instrument 2.3.0.beta5 → 2.3.0.beta6

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
  SHA1:
3
- metadata.gz: 3778ad062c094c39ea30a024aea34b09399966d1
4
- data.tar.gz: b7f1fa108b6125fb48778520abc947ce149e2317
3
+ metadata.gz: 992aa50ef5d76e907dd2932f9f7cc7f50bbd073b
4
+ data.tar.gz: 136242c6b8359a006db090ae6108d0f8a8d630a9
5
5
  SHA512:
6
- metadata.gz: 143d81f6dfe35e31b3faf1d69007792b2498ef553148ed61e1eb357c170b2990ceba09d27e2b58c078d6cfd0d8c1d78fbc999f377d6142ff2d599f21b44b7058
7
- data.tar.gz: 03c3d70cae11a1a9f92e6160b09c51fd23e275c485cb37bc468447b9ec4665431f83a1ca96ea5f4fc498ba80891573bc002ddb2a93e81353d92e18c264d95971
6
+ metadata.gz: 2809a4595b84f43693bb32baaa3eb5a4b05899d1be57e2090def3f3758159a9a9be49117e8ae5a53f178003930d692bb50a20a0a5f133e5d8992c5ab97830899
7
+ data.tar.gz: f098309c9a9755d4b6c1b455cc0e63312d077ca096aebdc8424203fd04e00892dda9bb500de6ff1dcecd3b0356e83893dd720c6964ed58ab78672bb6b3a79d1c
data/CHANGELOG.md CHANGED
@@ -8,6 +8,7 @@ please at an entry to the "unreleased changes" section below.
8
8
  ### Version 2.3.0.beta
9
9
 
10
10
  - Add support for beta, datadog specifc distribution metrics
11
+ - Invalidate socket on connectivity issues
11
12
 
12
13
  ### Version 2.2.1
13
14
 
@@ -146,6 +146,7 @@ module StatsD::Instrument::Backends
146
146
  socket.send(command, 0) > 0
147
147
  rescue SocketError, IOError, SystemCallError, Errno::ECONNREFUSED => e
148
148
  StatsD.logger.error "[StatsD] #{e.class.name}: #{e.message}"
149
+ invalidate_socket
149
150
  end
150
151
 
151
152
  def invalidate_socket
@@ -1,5 +1,5 @@
1
1
  module StatsD
2
2
  module Instrument
3
- VERSION = "2.3.0.beta5"
3
+ VERSION = "2.3.0.beta6"
4
4
  end
5
5
  end
@@ -207,4 +207,17 @@ class UDPBackendTest < Minitest::Test
207
207
 
208
208
  assert $?.success?, 'socket did not write on exit'
209
209
  end
210
+
211
+ def test_socket_error_should_invalidate_socket
212
+ seq = sequence('fail_then_succeed')
213
+
214
+ @socket.expects(:connect).with('localhost', 8125)
215
+ @socket.expects(:send).raises(Errno::EDESTADDRREQ).in_sequence(seq)
216
+
217
+ @socket.expects(:send).returns(1).in_sequence(seq)
218
+ @logger.expects(:error)
219
+
220
+ StatsD.increment('fail')
221
+ StatsD.increment('succeed')
222
+ end
210
223
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.beta5
4
+ version: 2.3.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Storimer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-07-10 00:00:00.000000000 Z
13
+ date: 2018-08-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake