logstash-output-scalyr 0.1.8 → 0.1.13

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 +27 -0
  3. data/Gemfile +5 -0
  4. data/README.md +3 -2
  5. data/lib/logstash/outputs/scalyr.rb +226 -138
  6. data/lib/scalyr/common/client.rb +76 -50
  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 +148 -8
  11. data/spec/logstash/outputs/scalyr_spec.rb +12 -6
  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: 67c7ee2ee65ab144dc7eebd1fa6a553ef1fb4d6c89558c023f334d8a728e5f2e
4
- data.tar.gz: 48027aa03b3d0d5ccf51db08e0b2f2bed125c2d571a07bd64dac2e853485cd48
3
+ metadata.gz: 89b457b34b9579d3e6c7b82c7aed5a5ae54026904deee677d31f0a0ef5ed3e22
4
+ data.tar.gz: 945e0414df96259ba39747e1f79ee8ed6d3c265d0c91aae0c15c91b9578988b9
5
5
  SHA512:
6
- metadata.gz: 0cb175245132cb45a1e243383b544b9ee1483084b10eac4a4e44ce7fc1e149fb7bba083a3e6df399e090a25693d4637117abf0f5f765a63fad3cb8c293337b4d
7
- data.tar.gz: bb8fc93d41d6a05f517c87bbc1e2e86ec4ceb939f1d08b017434a43057e54aa2919f6e052efe435c7aacb1f9ccc6e61a9ee05409fcebccc5ac44a07d72d556b6
6
+ metadata.gz: 411e2319e7fb06de8af26ea876776500327e8fb57002cef3f4a3b153294039b486fe574089f3acdd8761309335dd83b9e3f75dbbd23c5ad701d59702e7d7fe11
7
+ data.tar.gz: d17765c84763f27858548ede5afd45cc0d2ff11ef1462b586afa195fa0186f2cf0318a86463354285acae7d598aa45319305dea7ccc94581aa614a82e56dbe85
data/CHANGELOG.md CHANGED
@@ -1,4 +1,31 @@
1
1
  # Beta
2
+
3
+ ## 0.1.13
4
+ - Fix synchronization of status message sending code to avoid duplicate logs.
5
+
6
+ ## 0.1.12
7
+ - Add logging of successful request retries after an error for additional clarity.
8
+ - Add debug level logging of request body on error.
9
+
10
+ ## 0.1.11.beta
11
+ - Fixes to retry mechanisms.
12
+ - More thorough catching of events, preferring to retry requests rather than crashing the plugin.
13
+
14
+ ## 0.1.10.beta
15
+
16
+ - Switch to shared concurrency to allow the use of multiple worker threads for increased
17
+ throughput.
18
+ - Switch HTTP client library to `manticore` to work better with new shared concurrency.
19
+
20
+ ## 0.1.9
21
+
22
+ - Add support for logging status messages with metrics to stdout in addition to sending this
23
+ data to Scalyr by setting ``log_status_messages_to_stdout`` config option. By default those
24
+ lines are logged under INFO log level and you may need to enable / configure pluggin logging
25
+ as per https://www.elastic.co/guide/en/logstash/current/logging.html.
26
+ - Update metric reporting code to round float values to 4 decimal points so we also record sub
27
+ millisecond values for per event metrics.
28
+
2
29
  ## 0.1.8
3
30
 
4
31
  - Add additional metrics.
data/Gemfile CHANGED
@@ -10,6 +10,11 @@ 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'
20
+ gem 'manticore', platform: :jruby
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.8.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.13.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
 
@@ -378,6 +378,7 @@ The changelog should also be updated with the latest version and changes of note
378
378
  To deploy the current code on your machine run these commands:
379
379
 
380
380
  ```
381
+ rm -rf vendor/
381
382
  bundle check --path vendor/bundle || bundle install --deployment
382
383
  curl -u RUBY_USER:RUBY_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
383
384
  chmod 0600 ~/.gem/credentials
@@ -8,9 +8,7 @@ require "thread" # for safe queueing
8
8
  require "uri" # for escaping user input
9
9
  require 'json' # for converting event object to JSON for upload
10
10
 
11
- require 'net/http'
12
- require 'net/http/persistent'
13
- require 'net/https'
11
+ require 'manticore'
14
12
  require 'rbzip2'
15
13
  require 'zlib'
16
14
  require 'stringio'
@@ -18,6 +16,7 @@ require 'quantile'
18
16
 
19
17
  require 'scalyr/common/client'
20
18
  require "scalyr/common/util"
19
+ require "scalyr/constants"
21
20
 
22
21
 
23
22
  #---------------------------------------------------------------------------------------------------------------------
@@ -27,9 +26,7 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
27
26
 
28
27
  config_name "scalyr"
29
28
 
30
- # For correctness reasons we need to limit this plugin to a single worker, a single worker will be single concurrency
31
- # anyway but we should be explicit.
32
- concurrency :single
29
+ concurrency :shared
33
30
 
34
31
  # The Scalyr API write token, these are available at https://www.scalyr.com/keys. This is the only compulsory configuration field required for proper upload
35
32
  config :api_write_token, :validate => :string, :required => true
@@ -37,12 +34,6 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
37
34
  # If you have an EU-based Scalyr account, please use https://eu.scalyr.com/
38
35
  config :scalyr_server, :validate => :string, :default => "https://agent.scalyr.com/"
39
36
 
40
- # Path to SSL bundle file.
41
- config :ssl_ca_bundle_path, :validate => :string, :default => "/etc/ssl/certs/ca-bundle.crt"
42
-
43
- # If we should append our built-in Scalyr cert to the one we find at `ssl_ca_bundle_path`.
44
- config :append_builtin_cert, :validate => :boolean, :default => true
45
-
46
37
  # server_attributes is a dictionary of key value pairs that represents/identifies the logstash aggregator server
47
38
  # (where this plugin is running). Keys are arbitrary except for the 'serverHost' key which holds special meaning to
48
39
  # Scalyr and is given special treatment in the Scalyr UI. All of these attributes are optional (not required for logs
@@ -91,9 +82,14 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
91
82
  # Set max interval in seconds between bulk retries.
92
83
  config :retry_max_interval, :validate => :number, :default => 64
93
84
 
94
- # The following two settings pertain to preventing Man-in-the-middle (MITM) attacks # echee TODO: eliminate?
85
+ # Whether or not to verify the connection to Scalyr, only set to false for debugging.
95
86
  config :ssl_verify_peer, :validate => :boolean, :default => true
96
- config :ssl_verify_depth, :validate => :number, :default => 5
87
+
88
+ # Path to SSL bundle file.
89
+ config :ssl_ca_bundle_path, :validate => :string, :default => "/etc/ssl/certs/ca-bundle.crt"
90
+
91
+ # If we should append our built-in Scalyr cert to the one we find at `ssl_ca_bundle_path`.
92
+ config :append_builtin_cert, :validate => :boolean, :default => true
97
93
 
98
94
  config :max_request_buffer, :validate => :number, :default => 5500000 # echee TODO: eliminate?
99
95
  config :force_message_encoding, :validate => :string, :default => nil
@@ -109,6 +105,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
109
105
  # minutes.
110
106
  config :status_report_interval, :validate => :number, :default => 300
111
107
 
108
+ # Set to true to also log status messages with various metrics to stdout in addition to sending
109
+ # this data to Scalyr
110
+ config :log_status_messages_to_stdout, :validate => :boolean, :default => false
111
+
112
112
  # Whether or not to count status event uploads in the statistics such as request latency etc.
113
113
  config :record_stats_for_status, :validate => :boolean, :default => false
114
114
 
@@ -128,6 +128,24 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
128
128
  # Whether or not to create fresh quantile estimators after a status send. Depending on what you want to gather from
129
129
  # these stas this might be wanted or not.
130
130
  config :flush_quantile_estimates_on_status_send, :validate => :boolean, :default => false
131
+
132
+ # Causes this plugin to act as if it successfully uploaded the logs, while actually returning as quickly as possible
133
+ # after no work being done.
134
+ config :noop_mode, :validate => :boolean, :default => false
135
+
136
+ # Manticore related options
137
+ config :http_connect_timeout, :validate => :number, :default => 10
138
+ config :http_socket_timeout, :validate => :number, :default => 10
139
+ config :http_request_timeout, :validate => :number, :default => 60
140
+ config :http_pool_max, :validate => :number, :default => 50
141
+ config :http_pool_max_per_route, :validate => :number, :default => 25
142
+
143
+ def initialize(*params)
144
+ super
145
+ # Request statistics are accumulated across multiple threads and must be accessed through a mutex
146
+ @stats_lock = Mutex.new
147
+ @send_stats = Mutex.new
148
+ end
131
149
 
132
150
  def close
133
151
  @running = false
@@ -136,6 +154,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
136
154
 
137
155
  public
138
156
  def register
157
+ # This prng is used exclusively to determine when to sample statistics and no security related purpose, for this
158
+ # reason we do not ensure thread safety for it.
139
159
  @prng = Random.new
140
160
 
141
161
  if @event_metrics_sample_rate < 0 or @event_metrics_sample_rate > 1
@@ -219,12 +239,12 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
219
239
  @running = true
220
240
  @client_session = Scalyr::Common::Client::ClientSession.new(
221
241
  @logger, @add_events_uri,
222
- @compression_type, @compression_level,
223
- @ssl_verify_peer, @ssl_ca_bundle_path, @ssl_verify_depth,
224
- @append_builtin_cert, @record_stats_for_status, @flush_quantile_estimates_on_status_send
242
+ @compression_type, @compression_level, @ssl_verify_peer, @ssl_ca_bundle_path, @append_builtin_cert,
243
+ @record_stats_for_status, @flush_quantile_estimates_on_status_send,
244
+ @http_connect_timeout, @http_socket_timeout, @http_request_timeout, @http_pool_max, @http_pool_max_per_route
225
245
  )
226
246
 
227
- @logger.info("Started Scalyr output plugin", :class => self.class.name)
247
+ @logger.info(sprintf("Started Scalyr output plugin (%s)." % [PLUGIN_VERSION]), :class => self.class.name)
228
248
 
229
249
  # Finally, send a status line to Scalyr
230
250
  send_status
@@ -237,7 +257,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
237
257
  :multi_receive_duration_secs => Quantile::Estimator.new,
238
258
  :multi_receive_event_count => Quantile::Estimator.new,
239
259
  :event_attributes_count => Quantile::Estimator.new,
240
- :flatten_values_duration_secs => Quantile::Estimator.new
260
+ :flatten_values_duration_secs => Quantile::Estimator.new,
261
+ :batches_per_multi_receive => Quantile::Estimator.new
241
262
  }
242
263
  end
243
264
 
@@ -253,84 +274,129 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
253
274
  #
254
275
  public
255
276
  def multi_receive(events)
256
- start_time = Time.now.to_f
277
+ # Just return and pretend we did something if running in noop mode
278
+ return events if @noop_mode
257
279
 
258
- multi_event_request_array = build_multi_event_request_array(events)
259
- # Loop over all array of multi-event requests, sending each multi-event to Scalyr
280
+ begin
281
+ start_time = Time.now.to_f
260
282
 
261
- sleep_interval = @retry_initial_interval
262
- batch_num = 1
263
- total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
283
+ multi_event_request_array = build_multi_event_request_array(events)
284
+ # Loop over all array of multi-event requests, sending each multi-event to Scalyr
264
285
 
265
- result = []
266
- records_count = events.to_a.length
286
+ sleep_interval = @retry_initial_interval
287
+ batch_num = 1
288
+ total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
267
289
 
268
- while !multi_event_request_array.to_a.empty?
269
- begin
290
+ result = []
291
+ records_count = events.to_a.length
292
+
293
+ while !multi_event_request_array.to_a.empty?
270
294
  multi_event_request = multi_event_request_array.pop
271
- # For some reason a retry on the multi_receive may result in the request array containing `nil` elements, we
272
- # ignore these.
273
- if !multi_event_request.nil?
274
- @client_session.post_add_events(multi_event_request[:body], false, multi_event_request[:serialization_duration])
275
- sleep_interval = 0
276
- result.push(multi_event_request)
295
+ # Variables to hold information about exceptions we run into, and our handling of retries for this request. We
296
+ # track this to log it when the retries succeed so we can be sure logs are going through.
297
+ # General exception info we log in the error
298
+ exc_data = nil
299
+ # Whether the exception is commonly retried or not, for determining log level
300
+ exc_commonly_retried = false
301
+ # Count of retries attempted for this request
302
+ exc_retries = 0
303
+ # Total time spent sleeping while retrying this request due to backoff
304
+ exc_sleep = 0
305
+ begin
306
+ # For some reason a retry on the multi_receive may result in the request array containing `nil` elements, we
307
+ # ignore these.
308
+ if !multi_event_request.nil?
309
+ @client_session.post_add_events(multi_event_request[:body], false, multi_event_request[:serialization_duration])
310
+
311
+ sleep_interval = @retry_initial_interval
312
+ batch_num += 1
313
+ result.push(multi_event_request)
314
+ end
315
+
316
+ rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
317
+ sleep_interval = sleep_for(sleep_interval)
318
+ exc_sleep += sleep_interval
319
+ exc_retries += 1
320
+ message = "Error uploading to Scalyr (will backoff-retry)"
321
+ exc_data = {
322
+ :url => e.url.to_s,
323
+ :message => e.message,
324
+ :batch_num => batch_num,
325
+ :total_batches => total_batches,
326
+ :record_count => multi_event_request[:record_count],
327
+ :payload_size => multi_event_request[:body].bytesize,
328
+ :will_retry_in_seconds => sleep_interval,
329
+ }
330
+ exc_data[:code] = e.code if e.code
331
+ if @logger.debug? and e.body
332
+ exc_data[:body] = e.body
333
+ elsif e.message == "Invalid JSON response from server" and e.body
334
+ exc_data[:body] = Scalyr::Common::Util.truncate(e.body, 512)
335
+ end
336
+ exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
337
+ if e.is_commonly_retried?
338
+ # well-known retriable errors should be debug
339
+ @logger.debug(message, exc_data)
340
+ exc_commonly_retried = true
341
+ else
342
+ # all other failed uploads should be errors
343
+ @logger.error(message, exc_data)
344
+ exc_commonly_retried = false
345
+ end
346
+ retry if @running
347
+
348
+ rescue => e
349
+ # Any unexpected errors should be fully logged
350
+ @logger.error(
351
+ "Unexpected error occurred while uploading to Scalyr (will backoff-retry)",
352
+ :error_message => e.message,
353
+ :error_class => e.class.name,
354
+ :backtrace => e.backtrace
355
+ )
356
+ @logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
357
+ sleep_interval = sleep_for(sleep_interval)
358
+ exc_data = {
359
+ :error_message => e.message,
360
+ :error_class => e.class.name,
361
+ :backtrace => e.backtrace,
362
+ :multi_event_request => multi_event_request
363
+ }
364
+ exc_sleep += sleep_interval
365
+ exc_retries += 1
366
+ retry if @running
277
367
  end
278
368
 
279
- rescue OpenSSL::SSL::SSLError => e
280
- # cannot rely on exception message, so we always log the following warning
281
- @logger.error "SSL certificate verification failed. " +
282
- "Please make sure your certificate bundle is configured correctly and points to a valid file. " +
283
- "You can configure this with the ssl_ca_bundle_path configuration option. " +
284
- "The current value of ssl_ca_bundle_path is '#{@ssl_ca_bundle_path}'"
285
- @logger.error e.message
286
- @logger.error "Discarding buffer chunk without retrying."
287
-
288
- rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
289
- sleep_interval = sleep_for(sleep_interval)
290
- message = "Error uploading to Scalyr (will backoff-retry)"
291
- exc_data = {
292
- :url => e.url.to_s,
293
- :message => e.message,
294
- :batch_num => batch_num,
295
- :total_batches => total_batches,
296
- :record_count => multi_event_request[:record_count],
297
- :payload_size => multi_event_request[:body].bytesize,
298
- :will_retry_in_seconds => sleep_interval,
299
- }
300
- exc_data[:code] = e.response_code if e.code
301
- exc_data[:body] = e.response_body if @logger.debug? and e.body
302
- exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
303
- if e.is_commonly_retried?
304
- # well-known retriable errors should be debug
305
- @logger.debug(message, exc_data)
306
- else
307
- # all other failed uploads should be errors
308
- @logger.error(message, exc_data)
369
+ if !exc_data.nil?
370
+ message = "Retry successful after error."
371
+ if exc_commonly_retried
372
+ @logger.debug(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
373
+ else
374
+ @logger.info(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
375
+ end
309
376
  end
310
- retry if @running
377
+ end
311
378
 
312
- rescue => e
313
- # Any unexpected errors should be fully logged
314
- @logger.error(
315
- "Unexpected error occurred while uploading to Scalyr (will backoff-retry)",
316
- :error_message => e.message,
317
- :error_class => e.class.name,
318
- :backtrace => e.backtrace
319
- )
320
- @logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
321
- sleep_interval = sleep_for(sleep_interval)
322
- retry if @running
379
+ if records_count > 0
380
+ @stats_lock.synchronize do
381
+ @multi_receive_statistics[:total_multi_receive_secs] += (Time.now.to_f - start_time)
382
+ @plugin_metrics[:multi_receive_duration_secs].observe(Time.now.to_f - start_time)
383
+ @plugin_metrics[:multi_receive_event_count].observe(records_count)
384
+ @plugin_metrics[:batches_per_multi_receive].observe(total_batches)
385
+ end
323
386
  end
324
- end
325
387
 
326
- if records_count > 0
327
- @multi_receive_statistics[:total_multi_receive_secs] += (Time.now.to_f - start_time)
328
- @plugin_metrics[:multi_receive_duration_secs].observe(Time.now.to_f - start_time)
329
- @plugin_metrics[:multi_receive_event_count].observe(records_count)
388
+ send_status
389
+ return result
390
+
391
+ rescue => e
392
+ # Any unexpected errors should be fully logged
393
+ @logger.error(
394
+ "Unexpected error occurred while executing multi_receive.",
395
+ :error_message => e.message,
396
+ :error_class => e.class.name,
397
+ :backtrace => e.backtrace
398
+ )
330
399
  end
331
-
332
- send_status
333
- return result
334
400
  end # def multi_receive
335
401
 
336
402
 
@@ -497,10 +563,12 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
497
563
  end
498
564
 
499
565
  if should_sample_event_metrics
500
- @plugin_metrics[:event_attributes_count].observe(record.count)
566
+ @stats_lock.synchronize do
567
+ @plugin_metrics[:event_attributes_count].observe(record.count)
501
568
 
502
- if @flatten_nested_values
503
- @plugin_metrics[:flatten_values_duration_secs].observe(flatten_nested_values_duration)
569
+ if @flatten_nested_values
570
+ @plugin_metrics[:flatten_values_duration_secs].observe(flatten_nested_values_duration)
571
+ end
504
572
  end
505
573
  end
506
574
 
@@ -594,7 +662,7 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
594
662
  def create_multi_event_request(scalyr_events, current_threads, current_logs)
595
663
 
596
664
  body = {
597
- :session => @session_id,
665
+ :session => @session_id + Thread.current.object_id.to_s,
598
666
  :token => @api_write_token,
599
667
  :events => scalyr_events,
600
668
  }
@@ -634,33 +702,39 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
634
702
 
635
703
  # Retrieve batch and other event level metric values
636
704
  def get_stats
637
- current_stats = @multi_receive_statistics.clone
705
+ @stats_lock.synchronize do
706
+ current_stats = @multi_receive_statistics.clone
638
707
 
639
- current_stats[:multi_receive_duration_p50] = @plugin_metrics[:multi_receive_duration_secs].query(0.5)
640
- current_stats[:multi_receive_duration_p90] = @plugin_metrics[:multi_receive_duration_secs].query(0.9)
641
- current_stats[:multi_receive_duration_p99] = @plugin_metrics[:multi_receive_duration_secs].query(0.99)
708
+ current_stats[:multi_receive_duration_p50] = @plugin_metrics[:multi_receive_duration_secs].query(0.5)
709
+ current_stats[:multi_receive_duration_p90] = @plugin_metrics[:multi_receive_duration_secs].query(0.9)
710
+ current_stats[:multi_receive_duration_p99] = @plugin_metrics[:multi_receive_duration_secs].query(0.99)
642
711
 
643
- current_stats[:multi_receive_event_count_p50] = @plugin_metrics[:multi_receive_event_count].query(0.5)
644
- current_stats[:multi_receive_event_count_p90] = @plugin_metrics[:multi_receive_event_count].query(0.9)
645
- current_stats[:multi_receive_event_count_p99] = @plugin_metrics[:multi_receive_event_count].query(0.99)
712
+ current_stats[:multi_receive_event_count_p50] = @plugin_metrics[:multi_receive_event_count].query(0.5)
713
+ current_stats[:multi_receive_event_count_p90] = @plugin_metrics[:multi_receive_event_count].query(0.9)
714
+ current_stats[:multi_receive_event_count_p99] = @plugin_metrics[:multi_receive_event_count].query(0.99)
646
715
 
647
- current_stats[:event_attributes_count_p50] = @plugin_metrics[:event_attributes_count].query(0.5)
648
- current_stats[:event_attributes_count_p90] = @plugin_metrics[:event_attributes_count].query(0.9)
649
- current_stats[:event_attributes_count_p99] = @plugin_metrics[:event_attributes_count].query(0.99)
716
+ current_stats[:event_attributes_count_p50] = @plugin_metrics[:event_attributes_count].query(0.5)
717
+ current_stats[:event_attributes_count_p90] = @plugin_metrics[:event_attributes_count].query(0.9)
718
+ current_stats[:event_attributes_count_p99] = @plugin_metrics[:event_attributes_count].query(0.99)
650
719
 
651
- if @flatten_nested_values
652
- # We only return those metrics in case flattening is enabled
653
- current_stats[:flatten_values_duration_secs_p50] = @plugin_metrics[:flatten_values_duration_secs].query(0.5)
654
- current_stats[:flatten_values_duration_secs_p90] = @plugin_metrics[:flatten_values_duration_secs].query(0.9)
655
- current_stats[:flatten_values_duration_secs_p99] = @plugin_metrics[:flatten_values_duration_secs].query(0.99)
656
- end
720
+ current_stats[:batches_per_multi_receive_p50] = @plugin_metrics[:batches_per_multi_receive].query(0.5)
721
+ current_stats[:batches_per_multi_receive_p90] = @plugin_metrics[:batches_per_multi_receive].query(0.9)
722
+ current_stats[:batches_per_multi_receive_p99] = @plugin_metrics[:batches_per_multi_receive].query(0.99)
657
723
 
658
- if @flush_quantile_estimates_on_status_send
659
- @logger.debug "Recreating / reseting quantile estimator classes for plugin metrics"
660
- @plugin_metrics = get_new_metrics
661
- end
724
+ if @flatten_nested_values
725
+ # We only return those metrics in case flattening is enabled
726
+ current_stats[:flatten_values_duration_secs_p50] = @plugin_metrics[:flatten_values_duration_secs].query(0.5)
727
+ current_stats[:flatten_values_duration_secs_p90] = @plugin_metrics[:flatten_values_duration_secs].query(0.9)
728
+ current_stats[:flatten_values_duration_secs_p99] = @plugin_metrics[:flatten_values_duration_secs].query(0.99)
729
+ end
730
+
731
+ if @flush_quantile_estimates_on_status_send
732
+ @logger.debug "Recreating / reseting quantile estimator classes for plugin metrics"
733
+ @plugin_metrics = get_new_metrics
734
+ end
662
735
 
663
- current_stats
736
+ current_stats
737
+ end
664
738
  end
665
739
 
666
740
 
@@ -679,37 +753,51 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
679
753
  'plugin_id' => self.id,
680
754
  }
681
755
  }
682
-
683
- if !@last_status_transmit_time
684
- status_event[:attrs]['message'] = "Started Scalyr LogStash output plugin."
685
- status_event[:attrs]['serverHost'] = @node_hostname
686
- else
687
- cur_time = Time.now()
688
- return if (cur_time.to_i - @last_status_transmit_time.to_i) < @status_report_interval
689
- # echee TODO: get instance stats from session and create a status log line
690
- msg = 'plugin_status: '
691
- cnt = 0
692
- @client_session.get_stats.each do |k, v|
693
- val = v.instance_of?(Float) ? sprintf("%.3f", v) : v
694
- val = val.nil? ? 0 : val
695
- msg << ' ' if cnt > 0
696
- msg << "#{k.to_s}=#{val}"
697
- cnt += 1
756
+ @send_stats.synchronize do
757
+ if !@last_status_transmit_time
758
+ status_event[:attrs]['message'] = sprintf("Started Scalyr LogStash output plugin (%s)." % [PLUGIN_VERSION])
759
+ status_event[:attrs]['serverHost'] = @node_hostname
760
+ else
761
+ cur_time = Time.now()
762
+ return if (cur_time.to_i - @last_status_transmit_time.to_i) < @status_report_interval
763
+ # echee TODO: get instance stats from session and create a status log line
764
+ msg = 'plugin_status: '
765
+ cnt = 0
766
+ @client_session.get_stats.each do |k, v|
767
+ val = v.instance_of?(Float) ? sprintf("%.4f", v) : v
768
+ val = val.nil? ? 0 : val
769
+ msg << ' ' if cnt > 0
770
+ msg << "#{k.to_s}=#{val}"
771
+ cnt += 1
772
+ end
773
+ get_stats.each do |k, v|
774
+ val = v.instance_of?(Float) ? sprintf("%.4f", v) : v
775
+ val = val.nil? ? 0 : val
776
+ msg << ' ' if cnt > 0
777
+ msg << "#{k.to_s}=#{val}"
778
+ cnt += 1
779
+ end
780
+ status_event[:attrs]['message'] = msg
781
+ status_event[:attrs]['serverHost'] = @node_hostname
782
+ status_event[:attrs]['parser'] = @status_parser
698
783
  end
699
- get_stats.each do |k, v|
700
- val = v.instance_of?(Float) ? sprintf("%.3f", v) : v
701
- val = val.nil? ? 0 : val
702
- msg << ' ' if cnt > 0
703
- msg << "#{k.to_s}=#{val}"
704
- cnt += 1
784
+ multi_event_request = create_multi_event_request([status_event], nil, nil)
785
+ begin
786
+ @client_session.post_add_events(multi_event_request[:body], true, 0)
787
+ rescue => e
788
+ @logger.warn(
789
+ "Unexpected error occurred while uploading status to Scalyr",
790
+ :error_message => e.message,
791
+ :error_class => e.class.name
792
+ )
793
+ return
705
794
  end
706
- status_event[:attrs]['message'] = msg
707
- status_event[:attrs]['serverHost'] = @node_hostname
708
- status_event[:attrs]['parser'] = @status_parser
795
+ @last_status_transmit_time = Time.now()
796
+ end
797
+
798
+ if @log_status_messages_to_stdout
799
+ @logger.info msg
709
800
  end
710
- multi_event_request = create_multi_event_request([status_event], nil, nil)
711
- @client_session.post_add_events(multi_event_request[:body], true, 0)
712
- @last_status_transmit_time = Time.now()
713
801
  status_event
714
802
  end
715
803