statsd-instrument 2.5.1 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +1 -1
  3. data/.rubocop.yml +11 -6
  4. data/.yardopts +5 -0
  5. data/CHANGELOG.md +75 -6
  6. data/README.md +54 -46
  7. data/benchmark/datagram-client +41 -0
  8. data/lib/statsd/instrument/assertions.rb +168 -57
  9. data/lib/statsd/instrument/backends/udp_backend.rb +20 -29
  10. data/lib/statsd/instrument/capture_sink.rb +27 -0
  11. data/lib/statsd/instrument/client.rb +313 -0
  12. data/lib/statsd/instrument/datagram.rb +75 -0
  13. data/lib/statsd/instrument/datagram_builder.rb +101 -0
  14. data/lib/statsd/instrument/dogstatsd_datagram_builder.rb +71 -0
  15. data/lib/statsd/instrument/environment.rb +106 -29
  16. data/lib/statsd/instrument/log_sink.rb +24 -0
  17. data/lib/statsd/instrument/null_sink.rb +13 -0
  18. data/lib/statsd/instrument/rubocop/measure_as_dist_argument.rb +39 -0
  19. data/lib/statsd/instrument/rubocop/metaprogramming_positional_arguments.rb +6 -10
  20. data/lib/statsd/instrument/rubocop/metric_prefix_argument.rb +37 -0
  21. data/lib/statsd/instrument/rubocop/metric_return_value.rb +7 -6
  22. data/lib/statsd/instrument/rubocop/metric_value_keyword_argument.rb +11 -20
  23. data/lib/statsd/instrument/rubocop/positional_arguments.rb +13 -13
  24. data/lib/statsd/instrument/rubocop/splat_arguments.rb +8 -14
  25. data/lib/statsd/instrument/rubocop.rb +64 -0
  26. data/lib/statsd/instrument/statsd_datagram_builder.rb +14 -0
  27. data/lib/statsd/instrument/strict.rb +112 -22
  28. data/lib/statsd/instrument/udp_sink.rb +62 -0
  29. data/lib/statsd/instrument/version.rb +1 -1
  30. data/lib/statsd/instrument.rb +191 -100
  31. data/test/assertions_test.rb +139 -176
  32. data/test/capture_sink_test.rb +44 -0
  33. data/test/client_test.rb +164 -0
  34. data/test/compatibility/dogstatsd_datagram_compatibility_test.rb +162 -0
  35. data/test/datagram_builder_test.rb +120 -0
  36. data/test/deprecations_test.rb +56 -10
  37. data/test/dogstatsd_datagram_builder_test.rb +32 -0
  38. data/test/environment_test.rb +73 -7
  39. data/test/log_sink_test.rb +37 -0
  40. data/test/null_sink_test.rb +13 -0
  41. data/test/rubocop/measure_as_dist_argument_test.rb +44 -0
  42. data/test/rubocop/metaprogramming_positional_arguments_test.rb +1 -1
  43. data/test/rubocop/metric_prefix_argument_test.rb +38 -0
  44. data/test/rubocop/metric_return_value_test.rb +1 -1
  45. data/test/rubocop/metric_value_keyword_argument_test.rb +1 -1
  46. data/test/rubocop/positional_arguments_test.rb +1 -1
  47. data/test/rubocop/splat_arguments_test.rb +1 -1
  48. data/test/statsd_datagram_builder_test.rb +22 -0
  49. data/test/statsd_instrumentation_test.rb +0 -24
  50. data/test/statsd_test.rb +0 -23
  51. data/test/test_helper.rb +0 -2
  52. data/test/udp_backend_test.rb +25 -8
  53. data/test/udp_sink_test.rb +85 -0
  54. metadata +38 -2
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.5.1
4
+ version: 2.6.0
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: 2019-10-01 00:00:00.000000000 Z
13
+ date: 2019-10-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -125,6 +125,7 @@ files:
125
125
  - ".gitignore"
126
126
  - ".rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml"
127
127
  - ".rubocop.yml"
128
+ - ".yardopts"
128
129
  - CHANGELOG.md
129
130
  - CONTRIBUTING.md
130
131
  - Gemfile
@@ -132,6 +133,7 @@ files:
132
133
  - README.md
133
134
  - Rakefile
134
135
  - benchmark/README.md
136
+ - benchmark/datagram-client
135
137
  - benchmark/send-metrics-to-dev-null-log
136
138
  - benchmark/send-metrics-to-local-udp-receiver
137
139
  - lib/statsd-instrument.rb
@@ -142,18 +144,30 @@ files:
142
144
  - lib/statsd/instrument/backends/logger_backend.rb
143
145
  - lib/statsd/instrument/backends/null_backend.rb
144
146
  - lib/statsd/instrument/backends/udp_backend.rb
147
+ - lib/statsd/instrument/capture_sink.rb
148
+ - lib/statsd/instrument/client.rb
149
+ - lib/statsd/instrument/datagram.rb
150
+ - lib/statsd/instrument/datagram_builder.rb
151
+ - lib/statsd/instrument/dogstatsd_datagram_builder.rb
145
152
  - lib/statsd/instrument/environment.rb
146
153
  - lib/statsd/instrument/helpers.rb
154
+ - lib/statsd/instrument/log_sink.rb
147
155
  - lib/statsd/instrument/matchers.rb
148
156
  - lib/statsd/instrument/metric.rb
149
157
  - lib/statsd/instrument/metric_expectation.rb
158
+ - lib/statsd/instrument/null_sink.rb
150
159
  - lib/statsd/instrument/railtie.rb
160
+ - lib/statsd/instrument/rubocop.rb
161
+ - lib/statsd/instrument/rubocop/measure_as_dist_argument.rb
151
162
  - lib/statsd/instrument/rubocop/metaprogramming_positional_arguments.rb
163
+ - lib/statsd/instrument/rubocop/metric_prefix_argument.rb
152
164
  - lib/statsd/instrument/rubocop/metric_return_value.rb
153
165
  - lib/statsd/instrument/rubocop/metric_value_keyword_argument.rb
154
166
  - lib/statsd/instrument/rubocop/positional_arguments.rb
155
167
  - lib/statsd/instrument/rubocop/splat_arguments.rb
168
+ - lib/statsd/instrument/statsd_datagram_builder.rb
156
169
  - lib/statsd/instrument/strict.rb
170
+ - lib/statsd/instrument/udp_sink.rb
157
171
  - lib/statsd/instrument/version.rb
158
172
  - shipit.rubygems.yml
159
173
  - statsd-instrument.gemspec
@@ -163,23 +177,34 @@ files:
163
177
  - test/benchmark/metrics.rb
164
178
  - test/benchmark/tags.rb
165
179
  - test/capture_backend_test.rb
180
+ - test/capture_sink_test.rb
181
+ - test/client_test.rb
182
+ - test/compatibility/dogstatsd_datagram_compatibility_test.rb
183
+ - test/datagram_builder_test.rb
166
184
  - test/deprecations_test.rb
185
+ - test/dogstatsd_datagram_builder_test.rb
167
186
  - test/environment_test.rb
168
187
  - test/helpers/rubocop_helper.rb
169
188
  - test/helpers_test.rb
170
189
  - test/integration_test.rb
190
+ - test/log_sink_test.rb
171
191
  - test/logger_backend_test.rb
172
192
  - test/matchers_test.rb
173
193
  - test/metric_test.rb
194
+ - test/null_sink_test.rb
195
+ - test/rubocop/measure_as_dist_argument_test.rb
174
196
  - test/rubocop/metaprogramming_positional_arguments_test.rb
197
+ - test/rubocop/metric_prefix_argument_test.rb
175
198
  - test/rubocop/metric_return_value_test.rb
176
199
  - test/rubocop/metric_value_keyword_argument_test.rb
177
200
  - test/rubocop/positional_arguments_test.rb
178
201
  - test/rubocop/splat_arguments_test.rb
202
+ - test/statsd_datagram_builder_test.rb
179
203
  - test/statsd_instrumentation_test.rb
180
204
  - test/statsd_test.rb
181
205
  - test/test_helper.rb
182
206
  - test/udp_backend_test.rb
207
+ - test/udp_sink_test.rb
183
208
  homepage: https://github.com/Shopify/statsd-instrument
184
209
  licenses:
185
210
  - MIT
@@ -210,20 +235,31 @@ test_files:
210
235
  - test/benchmark/metrics.rb
211
236
  - test/benchmark/tags.rb
212
237
  - test/capture_backend_test.rb
238
+ - test/capture_sink_test.rb
239
+ - test/client_test.rb
240
+ - test/compatibility/dogstatsd_datagram_compatibility_test.rb
241
+ - test/datagram_builder_test.rb
213
242
  - test/deprecations_test.rb
243
+ - test/dogstatsd_datagram_builder_test.rb
214
244
  - test/environment_test.rb
215
245
  - test/helpers/rubocop_helper.rb
216
246
  - test/helpers_test.rb
217
247
  - test/integration_test.rb
248
+ - test/log_sink_test.rb
218
249
  - test/logger_backend_test.rb
219
250
  - test/matchers_test.rb
220
251
  - test/metric_test.rb
252
+ - test/null_sink_test.rb
253
+ - test/rubocop/measure_as_dist_argument_test.rb
221
254
  - test/rubocop/metaprogramming_positional_arguments_test.rb
255
+ - test/rubocop/metric_prefix_argument_test.rb
222
256
  - test/rubocop/metric_return_value_test.rb
223
257
  - test/rubocop/metric_value_keyword_argument_test.rb
224
258
  - test/rubocop/positional_arguments_test.rb
225
259
  - test/rubocop/splat_arguments_test.rb
260
+ - test/statsd_datagram_builder_test.rb
226
261
  - test/statsd_instrumentation_test.rb
227
262
  - test/statsd_test.rb
228
263
  - test/test_helper.rb
229
264
  - test/udp_backend_test.rb
265
+ - test/udp_sink_test.rb