logstash-output-scalyr 0.1.10.beta → 0.1.15.beta

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.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/Gemfile +4 -0
  4. data/README.md +2 -2
  5. data/lib/logstash/outputs/scalyr.rb +197 -80
  6. data/lib/scalyr/common/client.rb +11 -11
  7. data/lib/scalyr/common/util.rb +7 -0
  8. data/lib/scalyr/constants.rb +2 -0
  9. data/logstash-output-scalyr.gemspec +1 -1
  10. data/spec/logstash/outputs/scalyr_integration_spec.rb +187 -8
  11. data/spec/logstash/outputs/scalyr_spec.rb +35 -8
  12. data/vendor/bundle/jruby/2.5.0/bin/htmldiff +1 -1
  13. data/vendor/bundle/jruby/2.5.0/bin/ldiff +1 -1
  14. data/vendor/bundle/jruby/2.5.0/cache/addressable-2.7.0.gem +0 -0
  15. data/vendor/bundle/jruby/2.5.0/cache/crack-0.4.5.gem +0 -0
  16. data/vendor/bundle/jruby/2.5.0/cache/hashdiff-1.0.1.gem +0 -0
  17. data/vendor/bundle/jruby/2.5.0/cache/public_suffix-4.0.6.gem +0 -0
  18. data/vendor/bundle/jruby/2.5.0/cache/rexml-3.2.5.gem +0 -0
  19. data/vendor/bundle/jruby/2.5.0/cache/webmock-3.13.0.gem +0 -0
  20. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/CHANGELOG.md +235 -0
  21. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Gemfile +32 -0
  22. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/LICENSE.txt +202 -0
  23. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/README.md +121 -0
  24. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Rakefile +34 -0
  25. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/data/unicode.data +0 -0
  26. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable.rb +4 -0
  27. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna.rb +27 -0
  28. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/native.rb +61 -0
  29. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/pure.rb +676 -0
  30. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/template.rb +1045 -0
  31. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/uri.rb +2529 -0
  32. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/version.rb +32 -0
  33. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/idna_spec.rb +300 -0
  34. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/net_http_compat_spec.rb +30 -0
  35. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/rack_mount_compat_spec.rb +106 -0
  36. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/security_spec.rb +59 -0
  37. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/template_spec.rb +1451 -0
  38. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/uri_spec.rb +6603 -0
  39. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/spec_helper.rb +24 -0
  40. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/clobber.rake +4 -0
  41. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/gem.rake +93 -0
  42. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/git.rake +47 -0
  43. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/metrics.rake +24 -0
  44. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/rspec.rake +23 -0
  45. data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/yard.rake +29 -0
  46. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack.rb +7 -0
  47. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/json.rb +98 -0
  48. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/util.rb +17 -0
  49. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/version.rb +3 -0
  50. data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/xml.rb +238 -0
  51. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Gemfile +8 -0
  52. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/LICENSE +19 -0
  53. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/README.md +276 -0
  54. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Rakefile +18 -0
  55. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/changelog.md +100 -0
  56. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/hashdiff.gemspec +39 -0
  57. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff.rb +10 -0
  58. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/compare_hashes.rb +69 -0
  59. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/diff.rb +177 -0
  60. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs.rb +66 -0
  61. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
  62. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/linear_compare_array.rb +159 -0
  63. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/patch.rb +88 -0
  64. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/util.rb +155 -0
  65. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/version.rb +5 -0
  66. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/best_diff_spec.rb +75 -0
  67. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_array_spec.rb +60 -0
  68. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_spec.rb +360 -0
  69. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/lcs_spec.rb +76 -0
  70. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/linear_compare_array_spec.rb +50 -0
  71. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/patch_spec.rb +185 -0
  72. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/readme_spec.rb +15 -0
  73. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/util_spec.rb +116 -0
  74. data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/spec_helper.rb +15 -0
  75. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/2.0-Upgrade.md +52 -0
  76. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/CHANGELOG.md +406 -0
  77. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Gemfile +15 -0
  78. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/LICENSE.txt +22 -0
  79. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/README.md +207 -0
  80. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Rakefile +51 -0
  81. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/SECURITY.md +104 -0
  82. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/bin/console +15 -0
  83. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/codecov.yml +12 -0
  84. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/data/list.txt +13380 -0
  85. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix.rb +179 -0
  86. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/domain.rb +235 -0
  87. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/errors.rb +41 -0
  88. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/list.rb +247 -0
  89. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/rule.rb +350 -0
  90. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/version.rb +13 -0
  91. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/public_suffix.gemspec +29 -0
  92. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/acceptance_test.rb +131 -0
  93. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find.rb +66 -0
  94. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find_all.rb +102 -0
  95. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_names.rb +91 -0
  96. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select.rb +26 -0
  97. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select_incremental.rb +25 -0
  98. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_valid.rb +101 -0
  99. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/domain_profiler.rb +12 -0
  100. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler.rb +12 -0
  101. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler_jp.rb +12 -0
  102. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/initialization_profiler.rb +11 -0
  103. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/list_profsize.rb +11 -0
  104. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/object_binsize.rb +57 -0
  105. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/psl_test.rb +52 -0
  106. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/test_helper.rb +18 -0
  107. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/tests.txt +98 -0
  108. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/domain_test.rb +106 -0
  109. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/errors_test.rb +25 -0
  110. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/list_test.rb +241 -0
  111. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/public_suffix_test.rb +188 -0
  112. data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/rule_test.rb +222 -0
  113. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
  114. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/NEWS.md +178 -0
  115. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/README.md +48 -0
  116. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/context.rdoc +143 -0
  117. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/child.rdoc +87 -0
  118. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/document.rdoc +276 -0
  119. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/element.rdoc +602 -0
  120. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/node.rdoc +97 -0
  121. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
  122. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
  123. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
  124. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
  125. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
  126. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
  127. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
  128. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
  129. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
  130. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
  131. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
  132. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
  133. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
  134. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
  135. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
  136. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
  137. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
  138. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
  139. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
  140. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
  141. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
  142. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
  143. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
  144. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
  145. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
  146. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
  147. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
  148. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
  149. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
  150. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
  151. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
  152. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
  153. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
  154. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
  155. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
  156. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
  157. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
  158. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
  159. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
  160. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
  161. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
  162. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
  163. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
  164. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
  165. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
  166. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
  167. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
  168. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
  169. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
  170. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
  171. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
  172. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
  173. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
  174. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
  175. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
  176. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
  177. data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
  178. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/CHANGELOG.md +1894 -0
  179. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Gemfile +9 -0
  180. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/LICENSE +20 -0
  181. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/README.md +1176 -0
  182. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Rakefile +38 -0
  183. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock.rb +59 -0
  184. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/api.rb +109 -0
  185. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/assertion_failure.rb +11 -0
  186. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/callback_registry.rb +35 -0
  187. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/config.rb +18 -0
  188. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/cucumber.rb +10 -0
  189. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/deprecation.rb +9 -0
  190. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/errors.rb +17 -0
  191. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +216 -0
  192. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/curb_adapter.rb +351 -0
  193. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +231 -0
  194. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/excon_adapter.rb +165 -0
  195. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
  196. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
  197. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
  198. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/request.rb +16 -0
  199. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/response.rb +64 -0
  200. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/streamer.rb +29 -0
  201. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/webmock.rb +68 -0
  202. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb_adapter.rb +37 -0
  203. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb +259 -0
  204. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/manticore_adapter.rb +145 -0
  205. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http.rb +385 -0
  206. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http_response.rb +34 -0
  207. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/patron_adapter.rb +130 -0
  208. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +174 -0
  209. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/any_arg_matcher.rb +13 -0
  210. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_argument_matcher.rb +21 -0
  211. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_excluding_matcher.rb +15 -0
  212. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb +17 -0
  213. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/minitest.rb +41 -0
  214. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rack_response.rb +69 -0
  215. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_body_diff.rb +64 -0
  216. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_execution_verifier.rb +77 -0
  217. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_pattern.rb +405 -0
  218. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_registry.rb +35 -0
  219. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature.rb +54 -0
  220. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature_snippet.rb +61 -0
  221. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_stub.rb +100 -0
  222. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/response.rb +159 -0
  223. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/responses_sequence.rb +40 -0
  224. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec.rb +42 -0
  225. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers.rb +27 -0
  226. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/request_pattern_matcher.rb +78 -0
  227. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/webmock_matcher.rb +67 -0
  228. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_registry.rb +82 -0
  229. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_request_snippet.rb +38 -0
  230. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/test_unit.rb +20 -0
  231. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_counter.rb +39 -0
  232. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_keys_stringifier.rb +25 -0
  233. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_validator.rb +17 -0
  234. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/headers.rb +64 -0
  235. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/json.rb +67 -0
  236. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/query_mapper.rb +281 -0
  237. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/uri.rb +111 -0
  238. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/values_stringifier.rb +20 -0
  239. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/version_checker.rb +111 -0
  240. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/version.rb +3 -0
  241. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/webmock.rb +163 -0
  242. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_helper.rb +34 -0
  243. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_webmock.rb +9 -0
  244. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/webmock_spec.rb +60 -0
  245. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
  246. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec_helper.rb +73 -0
  247. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec.rb +499 -0
  248. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec_helper.rb +147 -0
  249. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec.rb +462 -0
  250. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +77 -0
  251. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec.rb +77 -0
  252. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec_helper.rb +52 -0
  253. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec.rb +93 -0
  254. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec_helper.rb +54 -0
  255. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec.rb +217 -0
  256. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec_helper.rb +57 -0
  257. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec.rb +107 -0
  258. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec_helper.rb +35 -0
  259. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_shared.rb +153 -0
  260. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec.rb +369 -0
  261. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec_helper.rb +64 -0
  262. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/real_net_http_spec.rb +20 -0
  263. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec.rb +125 -0
  264. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec_helper.rb +54 -0
  265. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +313 -0
  266. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/callbacks.rb +148 -0
  267. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/complex_cross_concern_behaviors.rb +36 -0
  268. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/enabling_and_disabling_webmock.rb +95 -0
  269. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb +15 -0
  270. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/request_expectations.rb +930 -0
  271. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/returning_declared_responses.rb +409 -0
  272. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/stubbing_requests.rb +678 -0
  273. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +135 -0
  274. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +60 -0
  275. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/webmock_shared.rb +41 -0
  276. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/fixtures/test.txt +1 -0
  277. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/quality_spec.rb +84 -0
  278. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/spec_helper.rb +48 -0
  279. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/example_curl_output.txt +22 -0
  280. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/failures.rb +9 -0
  281. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/my_rack_app.rb +53 -0
  282. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/network_connection.rb +19 -0
  283. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/webmock_server.rb +70 -0
  284. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/api_spec.rb +175 -0
  285. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/errors_spec.rb +129 -0
  286. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +17 -0
  287. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
  288. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_excluding_matcher_spec.rb +61 -0
  289. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_including_matcher_spec.rb +87 -0
  290. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/rack_response_spec.rb +112 -0
  291. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_body_diff_spec.rb +90 -0
  292. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_execution_verifier_spec.rb +208 -0
  293. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_pattern_spec.rb +736 -0
  294. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_registry_spec.rb +95 -0
  295. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_snippet_spec.rb +89 -0
  296. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_spec.rb +155 -0
  297. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_stub_spec.rb +199 -0
  298. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/response_spec.rb +286 -0
  299. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_registry_spec.rb +103 -0
  300. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_request_snippet_spec.rb +115 -0
  301. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_counter_spec.rb +39 -0
  302. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb +27 -0
  303. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/headers_spec.rb +28 -0
  304. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/json_spec.rb +33 -0
  305. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/query_mapper_spec.rb +157 -0
  306. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/uri_spec.rb +371 -0
  307. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/version_checker_spec.rb +65 -0
  308. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/webmock_spec.rb +60 -0
  309. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/http_request.rb +24 -0
  310. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/shared_test.rb +108 -0
  311. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_helper.rb +23 -0
  312. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_webmock.rb +12 -0
  313. data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/webmock.gemspec +54 -0
  314. data/vendor/bundle/jruby/2.5.0/specifications/addressable-2.7.0.gemspec +39 -0
  315. data/vendor/bundle/jruby/2.5.0/specifications/crack-0.4.5.gemspec +32 -0
  316. data/vendor/bundle/jruby/2.5.0/specifications/hashdiff-1.0.1.gemspec +46 -0
  317. data/vendor/bundle/jruby/2.5.0/specifications/public_suffix-4.0.6.gemspec +24 -0
  318. data/vendor/bundle/jruby/2.5.0/specifications/rexml-3.2.5.gemspec +42 -0
  319. data/vendor/bundle/jruby/2.5.0/specifications/webmock-3.13.0.gemspec +85 -0
  320. metadata +309 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 290310d36108a3311f55a47efbb3a73e01f19ccdf025a15590f86493459963da
4
- data.tar.gz: a5bf9f872c496fa65670cab36e0955f1417541db5f151e11f0d914abe5fc9920
3
+ metadata.gz: b2e4aabe9bf971e1e0638899d713f5f16d7123e9be6f1dd98b82ab7ccfadb63f
4
+ data.tar.gz: 59ed216e6811e485f48ebed2a8fb3875f31c64cdf0f3a3b6e0a6112b2d8e11b6
5
5
  SHA512:
6
- metadata.gz: 35d60d700b6bb6ccc43aea5151d07c306b29c5524ac8d80145ae792263ffe5e7264d22a59de3a21de9aa549c5963b4cd3c9b230b845f67c6ff9618faca863cad
7
- data.tar.gz: 41cf50b968a9a11efff957cda768cf9d05e1ccf3c36e4f4d8f12c3d1aca9fb9da049647432bf047d51c2b6fe33f7b711484632d108dcd390ca852bc45aa7a00d
6
+ metadata.gz: 45f6f63a99a7d232ea7cedaaa15ba5a64893d26788701ccfd6140367035771748cf4829a7a856642b704a20524a3d41710c9d9f23cc1daf3fea5b0b50394a626
7
+ data.tar.gz: 9a24eb6f935f9accd942b6091c33d9c3aca3601e7b833f07516c17a07e8e47660715f3e024748605ae57c40c38f3fc2f507151fa5708f6ab99280d3021c93e07
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Beta
2
2
 
3
+ ## 0.1.15.beta
4
+ - Only call ``send_status`` method at the end of ``multi_receive()`` if there is at least one
5
+ record in the batch when ``report_status_for_empty_batches`` config option is set to ``false``.
6
+ - Update ``register()`` method to use a separate short-lived client session for sending initial
7
+ client status.
8
+
9
+ ## 0.1.14.beta
10
+ - Add configurable max retries for requests when running into errors.
11
+ - Add ability to send messages to the dead letter queue if we exhaust all retries and if it is configured.
12
+ - Log truncated error body for all errors to help with debugging.
13
+
14
+ ## 0.1.13
15
+ - Fix synchronization of status message sending code to avoid duplicate logs.
16
+
17
+ ## 0.1.12
18
+ - Add logging of successful request retries after an error for additional clarity.
19
+ - Add debug level logging of request body on error.
20
+
21
+ ## 0.1.11.beta
22
+ - Fixes to retry mechanisms.
23
+ - More thorough catching of events, preferring to retry requests rather than crashing the plugin.
24
+
3
25
  ## 0.1.10.beta
4
26
 
5
27
  - Switch to shared concurrency to allow the use of multiple worker threads for increased
data/Gemfile CHANGED
@@ -10,6 +10,10 @@ if Dir.exist?(logstash_path) && use_logstash_source
10
10
  gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
11
  end
12
12
 
13
+ group :test do
14
+ gem "webmock"
15
+ end
16
+
13
17
  gem 'pry'
14
18
  gem 'pry-nav'
15
19
  gem 'quantile'
data/README.md CHANGED
@@ -10,7 +10,7 @@ You can view documentation for this plugin [on the Scalyr website](https://app.s
10
10
  # Quick start
11
11
 
12
12
  1. Build the gem, run `gem build logstash-output-scalyr.gemspec`
13
- 2. Install the gem into a Logstash installation, run `/usr/share/logstash/bin/logstash-plugin install logstash-output-scalyr-0.1.9.gem` or follow the latest official instructions on working with plugins from Logstash.
13
+ 2. Install the gem into a Logstash installation, run `/usr/share/logstash/bin/logstash-plugin install logstash-output-scalyr-0.1.14.beta.gem` or follow the latest official instructions on working with plugins from Logstash.
14
14
  3. Configure the output plugin (e.g. add it to a pipeline .conf)
15
15
  4. Restart Logstash
16
16
 
@@ -369,7 +369,7 @@ If you want to change status reporting interval you can do that by changing the
369
369
  ## Updating version
370
370
 
371
371
  Currently references to the version need to be manually updated, files to look in for this are `logstash-putput-scalyr.gemspec`,
372
- `client.rb`, twice in the CircleCI `Dockerfile`, and under "Quick Start" in this `README.md`.
372
+ `lib/scalyr/constants.rb`, and under "Quick Start" in this `README.md`.
373
373
 
374
374
  The changelog should also be updated with the latest version and changes of note.
375
375
 
@@ -16,6 +16,7 @@ require 'quantile'
16
16
 
17
17
  require 'scalyr/common/client'
18
18
  require "scalyr/common/util"
19
+ require "scalyr/constants"
19
20
 
20
21
 
21
22
  #---------------------------------------------------------------------------------------------------------------------
@@ -77,6 +78,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
77
78
 
78
79
  # Initial interval in seconds between bulk retries. Doubled on each retry up to `retry_max_interval`
79
80
  config :retry_initial_interval, :validate => :number, :default => 1
81
+ # How many times to retry sending an event before giving up on it
82
+ config :max_retries, :validate => :number, :default => 5
83
+ # Whether or not to send messages that failed to send a max_retries amount of times to the DLQ or just drop them
84
+ config :send_to_dlq, :validate => :boolean, :default => true
80
85
 
81
86
  # Set max interval in seconds between bulk retries.
82
87
  config :retry_max_interval, :validate => :number, :default => 64
@@ -104,6 +109,11 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
104
109
  # minutes.
105
110
  config :status_report_interval, :validate => :number, :default => 300
106
111
 
112
+ # True to also call send_status when multi_receive() is called with no events.
113
+ # In some situations (e.g. when logstash is configured with multiple scalyr
114
+ # plugins conditionally where most are idle) you may want to set this to false
115
+ config :report_status_for_empty_batches, :validate => :boolean, :default => true
116
+
107
117
  # Set to true to also log status messages with various metrics to stdout in addition to sending
108
118
  # this data to Scalyr
109
119
  config :log_status_messages_to_stdout, :validate => :boolean, :default => false
@@ -243,10 +253,21 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
243
253
  @http_connect_timeout, @http_socket_timeout, @http_request_timeout, @http_pool_max, @http_pool_max_per_route
244
254
  )
245
255
 
246
- @logger.info("Started Scalyr output plugin", :class => self.class.name)
256
+ @logger.info(sprintf("Started Scalyr output plugin (%s)." % [PLUGIN_VERSION]), :class => self.class.name)
247
257
 
248
258
  # Finally, send a status line to Scalyr
249
- send_status
259
+ # We use a special separate short lived client session for sending the initial client status.
260
+ # This is done to avoid the overhead in case single logstash instance has many scalyr output
261
+ # plugins configured with conditionals and majority of them are inactive (aka receive no data).
262
+ # This way we don't need to keep idle long running connection open.
263
+ initial_send_status_client_session = Scalyr::Common::Client::ClientSession.new(
264
+ @logger, @add_events_uri,
265
+ @compression_type, @compression_level, @ssl_verify_peer, @ssl_ca_bundle_path, @append_builtin_cert,
266
+ @record_stats_for_status, @flush_quantile_estimates_on_status_send,
267
+ @http_connect_timeout, @http_socket_timeout, @http_request_timeout, @http_pool_max, @http_pool_max_per_route
268
+ )
269
+ send_status(initial_send_status_client_session)
270
+ initial_send_status_client_session.close
250
271
 
251
272
  end # def register
252
273
 
@@ -256,7 +277,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
256
277
  :multi_receive_duration_secs => Quantile::Estimator.new,
257
278
  :multi_receive_event_count => Quantile::Estimator.new,
258
279
  :event_attributes_count => Quantile::Estimator.new,
259
- :flatten_values_duration_secs => Quantile::Estimator.new
280
+ :flatten_values_duration_secs => Quantile::Estimator.new,
281
+ :batches_per_multi_receive => Quantile::Estimator.new
260
282
  }
261
283
  end
262
284
 
@@ -275,90 +297,154 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
275
297
  # Just return and pretend we did something if running in noop mode
276
298
  return events if @noop_mode
277
299
 
278
- start_time = Time.now.to_f
300
+ begin
301
+ start_time = Time.now.to_f
279
302
 
280
- multi_event_request_array = build_multi_event_request_array(events)
281
- # Loop over all array of multi-event requests, sending each multi-event to Scalyr
303
+ multi_event_request_array = build_multi_event_request_array(events)
304
+ # Loop over all array of multi-event requests, sending each multi-event to Scalyr
282
305
 
283
- sleep_interval = @retry_initial_interval
284
- batch_num = 1
285
- total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
306
+ sleep_interval = @retry_initial_interval
307
+ batch_num = 1
308
+ total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
286
309
 
287
- result = []
288
- records_count = events.to_a.length
310
+ result = []
311
+ records_count = events.to_a.length
289
312
 
290
- while !multi_event_request_array.to_a.empty?
291
- begin
313
+ while !multi_event_request_array.to_a.empty?
292
314
  multi_event_request = multi_event_request_array.pop
293
- # For some reason a retry on the multi_receive may result in the request array containing `nil` elements, we
294
- # ignore these.
295
- if !multi_event_request.nil?
296
- @client_session.post_add_events(multi_event_request[:body], false, multi_event_request[:serialization_duration])
315
+ # Variables to hold information about exceptions we run into, and our handling of retries for this request. We
316
+ # track this to log it when the retries succeed so we can be sure logs are going through.
317
+ # General exception info we log in the error
318
+ exc_data = nil
319
+ # Whether the exception is commonly retried or not, for determining log level
320
+ exc_commonly_retried = false
321
+ # Count of retries attempted for this request
322
+ exc_retries = 0
323
+ # Total time spent sleeping while retrying this request due to backoff
324
+ exc_sleep = 0
325
+ begin
326
+ # For some reason a retry on the multi_receive may result in the request array containing `nil` elements, we
327
+ # ignore these.
328
+ if !multi_event_request.nil?
329
+ @client_session.post_add_events(multi_event_request[:body], false, multi_event_request[:serialization_duration])
330
+
331
+ sleep_interval = @retry_initial_interval
332
+ batch_num += 1
333
+ result.push(multi_event_request)
334
+ end
297
335
 
298
- sleep_interval = 0
299
- result.push(multi_event_request)
336
+ rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
337
+ sleep_interval = sleep_for(sleep_interval)
338
+ exc_sleep += sleep_interval
339
+ exc_retries += 1
340
+ message = "Error uploading to Scalyr (will backoff-retry)"
341
+ exc_data = {
342
+ :error_class => e.e_class,
343
+ :url => e.url.to_s,
344
+ :message => e.message,
345
+ :batch_num => batch_num,
346
+ :total_batches => total_batches,
347
+ :record_count => multi_event_request[:record_count],
348
+ :payload_size => multi_event_request[:body].bytesize,
349
+ :will_retry_in_seconds => sleep_interval,
350
+ }
351
+ exc_data[:code] = e.code if e.code
352
+ if @logger.debug? and e.body
353
+ exc_data[:body] = e.body
354
+ elsif e.body
355
+ exc_data[:body] = Scalyr::Common::Util.truncate(e.body, 512)
356
+ end
357
+ exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
358
+ if e.is_commonly_retried?
359
+ # well-known retriable errors should be debug
360
+ @logger.debug(message, exc_data)
361
+ exc_commonly_retried = true
362
+ else
363
+ # all other failed uploads should be errors
364
+ @logger.error(message, exc_data)
365
+ exc_commonly_retried = false
366
+ end
367
+ retry if @running and exc_retries < @max_retries
368
+ log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
369
+ next
370
+
371
+ rescue => e
372
+ # Any unexpected errors should be fully logged
373
+ @logger.error(
374
+ "Unexpected error occurred while uploading to Scalyr (will backoff-retry)",
375
+ :error_message => e.message,
376
+ :error_class => e.class.name,
377
+ :backtrace => e.backtrace
378
+ )
379
+ @logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
380
+ sleep_interval = sleep_for(sleep_interval)
381
+ exc_data = {
382
+ :error_message => e.message,
383
+ :error_class => e.class.name,
384
+ :backtrace => e.backtrace,
385
+ :multi_event_request => multi_event_request
386
+ }
387
+ exc_sleep += sleep_interval
388
+ exc_retries += 1
389
+ retry if @running and exc_retries < @max_retries
390
+ log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
391
+ next
300
392
  end
301
393
 
302
- rescue OpenSSL::SSL::SSLError => e
303
- # cannot rely on exception message, so we always log the following warning
304
- @logger.error "SSL certificate verification failed. " +
305
- "Please make sure your certificate bundle is configured correctly and points to a valid file. " +
306
- "You can configure this with the ssl_ca_bundle_path configuration option. " +
307
- "The current value of ssl_ca_bundle_path is '#{@ssl_ca_bundle_path}'"
308
- @logger.error e.message
309
- @logger.error "Discarding buffer chunk without retrying."
310
-
311
- rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
312
- sleep_interval = sleep_for(sleep_interval)
313
- message = "Error uploading to Scalyr (will backoff-retry)"
314
- exc_data = {
315
- :url => e.url.to_s,
316
- :message => e.message,
317
- :batch_num => batch_num,
318
- :total_batches => total_batches,
319
- :record_count => multi_event_request[:record_count],
320
- :payload_size => multi_event_request[:body].bytesize,
321
- :will_retry_in_seconds => sleep_interval,
322
- }
323
- exc_data[:code] = e.response_code if e.code
324
- exc_data[:body] = e.response_body if @logger.debug? and e.body
325
- exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
326
- if e.is_commonly_retried?
327
- # well-known retriable errors should be debug
328
- @logger.error(message, exc_data)
329
- else
330
- # all other failed uploads should be errors
331
- @logger.error(message, exc_data)
394
+ if !exc_data.nil?
395
+ message = "Retry successful after error."
396
+ if exc_commonly_retried
397
+ @logger.debug(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
398
+ else
399
+ @logger.info(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
400
+ end
332
401
  end
333
- retry if @running
402
+ end
334
403
 
335
- rescue => e
336
- # Any unexpected errors should be fully logged
337
- @logger.error(
338
- "Unexpected error occurred while uploading to Scalyr (will backoff-retry)",
339
- :error_message => e.message,
340
- :error_class => e.class.name,
341
- :backtrace => e.backtrace
342
- )
343
- @logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
344
- sleep_interval = sleep_for(sleep_interval)
345
- retry if @running
404
+ if records_count > 0
405
+ @stats_lock.synchronize do
406
+ @multi_receive_statistics[:total_multi_receive_secs] += (Time.now.to_f - start_time)
407
+ @plugin_metrics[:multi_receive_duration_secs].observe(Time.now.to_f - start_time)
408
+ @plugin_metrics[:multi_receive_event_count].observe(records_count)
409
+ @plugin_metrics[:batches_per_multi_receive].observe(total_batches)
410
+ end
346
411
  end
347
- end
348
412
 
349
- if records_count > 0
350
- @stats_lock.synchronize do
351
- @multi_receive_statistics[:total_multi_receive_secs] += (Time.now.to_f - start_time)
352
- @plugin_metrics[:multi_receive_duration_secs].observe(Time.now.to_f - start_time)
353
- @plugin_metrics[:multi_receive_event_count].observe(records_count)
413
+ if @report_status_for_empty_batches or records_count > 0
414
+ send_status
354
415
  end
355
- end
356
416
 
357
- send_status
358
- return result
417
+ return result
418
+
419
+ rescue => e
420
+ # Any unexpected errors should be fully logged
421
+ @logger.error(
422
+ "Unexpected error occurred while executing multi_receive.",
423
+ :error_message => e.message,
424
+ :error_class => e.class.name,
425
+ :backtrace => e.backtrace
426
+ )
427
+ end
359
428
  end # def multi_receive
360
429
 
361
430
 
431
+ def log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
432
+ message = "Failed to send #{multi_event_request[:logstash_events].length} events after #{exc_retries} tries."
433
+ sample_events = Array.new
434
+ multi_event_request[:logstash_events][0,5].each {|l_event|
435
+ sample_events << Scalyr::Common::Util.truncate(l_event.to_hash.to_json, 256)
436
+ }
437
+ @logger.error(message, :error_data => exc_data, :sample_events => sample_events, :retries => exc_retries, :sleep_time => exc_sleep)
438
+ if @dlq_writer
439
+ multi_event_request[:logstash_events].each {|l_event|
440
+ @dlq_writer.write(l_event, "#{exc_data[:message]}")
441
+ }
442
+ else
443
+ @logger.warn("Deal letter queue not configured, dropping #{multi_event_request[:logstash_events].length} events after #{exc_retries} tries.", :sample_events => sample_events)
444
+ end
445
+ end
446
+
447
+
362
448
  # Builds an array of multi-event requests from LogStash events
363
449
  # Each array element is a request that groups multiple events (to be posted to Scalyr's addEvents endpoint)
364
450
  #
@@ -387,6 +473,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
387
473
  current_threads = Hash.new
388
474
  # Create a Scalyr event object for each record in the chunk
389
475
  scalyr_events = Array.new
476
+ # Track the logstash events in each chunk to send them to the dlq in case of an error
477
+ l_events = Array.new
390
478
 
391
479
  thread_ids = Hash.new
392
480
  next_id = 1 #incrementing thread id for the session
@@ -578,9 +666,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
578
666
  # make sure we always have at least one event
579
667
  if scalyr_events.size == 0
580
668
  scalyr_events << scalyr_event
669
+ l_events << l_event
581
670
  append_event = false
582
671
  end
583
- multi_event_request = self.create_multi_event_request(scalyr_events, current_threads, logs)
672
+ multi_event_request = self.create_multi_event_request(scalyr_events, l_events, current_threads, logs)
584
673
  multi_event_request_array << multi_event_request
585
674
 
586
675
  total_bytes = 0
@@ -588,19 +677,21 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
588
677
  logs = Hash.new
589
678
  logs_ids = Hash.new
590
679
  scalyr_events = Array.new
680
+ l_events = Array.new
591
681
  end
592
682
 
593
683
  # if we haven't consumed the current event already
594
684
  # add it to the end of our array and keep track of the json bytesize
595
685
  if append_event
596
686
  scalyr_events << scalyr_event
687
+ l_events << l_event
597
688
  total_bytes += add_bytes
598
689
  end
599
690
 
600
691
  }
601
692
 
602
693
  # create a final request with any left over events
603
- multi_event_request = self.create_multi_event_request(scalyr_events, current_threads, logs)
694
+ multi_event_request = self.create_multi_event_request(scalyr_events, l_events, current_threads, logs)
604
695
  multi_event_request_array << multi_event_request
605
696
  multi_event_request_array
606
697
  end
@@ -618,7 +709,7 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
618
709
  # A request comprises multiple Scalyr Events. This function creates a request hash for
619
710
  # final upload to Scalyr (from an array of events, and an optional hash of current threads)
620
711
  # Note: The request body field will be json-encoded.
621
- def create_multi_event_request(scalyr_events, current_threads, current_logs)
712
+ def create_multi_event_request(scalyr_events, logstash_events, current_threads, current_logs)
622
713
 
623
714
  body = {
624
715
  :session => @session_id + Thread.current.object_id.to_s,
@@ -654,7 +745,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
654
745
  serialized_body = body.to_json
655
746
  end_time = Time.now.to_f
656
747
  serialization_duration = end_time - start_time
657
- { :body => serialized_body, :record_count => scalyr_events.size, :serialization_duration => serialization_duration }
748
+ {
749
+ :body => serialized_body, :record_count => scalyr_events.size, :serialization_duration => serialization_duration,
750
+ :logstash_events => logstash_events
751
+ }
658
752
 
659
753
  end # def create_multi_event_request
660
754
 
@@ -676,6 +770,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
676
770
  current_stats[:event_attributes_count_p90] = @plugin_metrics[:event_attributes_count].query(0.9)
677
771
  current_stats[:event_attributes_count_p99] = @plugin_metrics[:event_attributes_count].query(0.99)
678
772
 
773
+ current_stats[:batches_per_multi_receive_p50] = @plugin_metrics[:batches_per_multi_receive].query(0.5)
774
+ current_stats[:batches_per_multi_receive_p90] = @plugin_metrics[:batches_per_multi_receive].query(0.9)
775
+ current_stats[:batches_per_multi_receive_p99] = @plugin_metrics[:batches_per_multi_receive].query(0.99)
776
+
679
777
  if @flatten_nested_values
680
778
  # We only return those metrics in case flattening is enabled
681
779
  current_stats[:flatten_values_duration_secs_p50] = @plugin_metrics[:flatten_values_duration_secs].query(0.5)
@@ -699,7 +797,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
699
797
  # Finally, note that there could be multiple instances of this plugin (one per worker), in which case each worker
700
798
  # thread sends their own status updates. This is intentional so that we know how much data each worker thread is
701
799
  # uploading to Scalyr over time.
702
- def send_status
800
+ def send_status(client_session = nil)
801
+ client_session = @client_session if client_session.nil?
703
802
 
704
803
  status_event = {
705
804
  :ts => (Time.now.to_f * (10**9)).round,
@@ -710,7 +809,7 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
710
809
  }
711
810
  @send_stats.synchronize do
712
811
  if !@last_status_transmit_time
713
- status_event[:attrs]['message'] = "Started Scalyr LogStash output plugin."
812
+ status_event[:attrs]['message'] = sprintf("Started Scalyr LogStash output plugin (%s)." % [PLUGIN_VERSION])
714
813
  status_event[:attrs]['serverHost'] = @node_hostname
715
814
  else
716
815
  cur_time = Time.now()
@@ -718,7 +817,7 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
718
817
  # echee TODO: get instance stats from session and create a status log line
719
818
  msg = 'plugin_status: '
720
819
  cnt = 0
721
- @client_session.get_stats.each do |k, v|
820
+ client_session.get_stats.each do |k, v|
722
821
  val = v.instance_of?(Float) ? sprintf("%.4f", v) : v
723
822
  val = val.nil? ? 0 : val
724
823
  msg << ' ' if cnt > 0
@@ -736,10 +835,28 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
736
835
  status_event[:attrs]['serverHost'] = @node_hostname
737
836
  status_event[:attrs]['parser'] = @status_parser
738
837
  end
838
+ multi_event_request = create_multi_event_request([status_event], nil, nil, nil)
839
+ begin
840
+ client_session.post_add_events(multi_event_request[:body], true, 0)
841
+ rescue => e
842
+ if e.body
843
+ @logger.warn(
844
+ "Unexpected error occurred while uploading status to Scalyr",
845
+ :error_message => e.message,
846
+ :error_class => e.class.name,
847
+ :body => Scalyr::Common::Util.truncate(e.body, 512)
848
+ )
849
+ else
850
+ @logger.warn(
851
+ "Unexpected error occurred while uploading status to Scalyr",
852
+ :error_message => e.message,
853
+ :error_class => e.class.name
854
+ )
855
+ end
856
+ return
857
+ end
858
+ @last_status_transmit_time = Time.now()
739
859
  end
740
- multi_event_request = create_multi_event_request([status_event], nil, nil)
741
- @client_session.post_add_events(multi_event_request[:body], true, 0)
742
- @last_status_transmit_time = Time.now()
743
860
 
744
861
  if @log_status_messages_to_stdout
745
862
  @logger.info msg