logstash-output-scalyr 0.1.25.beta → 0.2.1.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -0
  3. data/Gemfile +4 -0
  4. data/README.md +127 -4
  5. data/lib/logstash/outputs/scalyr.rb +205 -39
  6. data/lib/scalyr/common/client.rb +10 -1
  7. data/lib/scalyr/common/util.rb +28 -1
  8. data/lib/scalyr/constants.rb +4 -1
  9. data/logstash-output-scalyr.gemspec +3 -2
  10. data/spec/benchmarks/bignum_fixing.rb +2 -5
  11. data/spec/benchmarks/flattening_and_serialization.rb +2 -27
  12. data/spec/benchmarks/json_serialization.rb +85 -0
  13. data/spec/benchmarks/set_session_level_serverhost_on_events.rb +107 -0
  14. data/spec/benchmarks/util.rb +24 -0
  15. data/spec/logstash/outputs/scalyr_integration_spec.rb +63 -16
  16. data/spec/logstash/outputs/scalyr_spec.rb +523 -15
  17. data/spec/scalyr/common/util_spec.rb +4 -0
  18. data/vendor/bundle/jruby/2.5.0/cache/jrjackson-0.4.14-java.gem +0 -0
  19. data/vendor/bundle/jruby/2.5.0/cache/json-1.8.6-java.gem +0 -0
  20. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/Gemfile +0 -0
  21. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/Mavenfile +1 -7
  22. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/README.md +0 -0
  23. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/Rakefile +8 -2
  24. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/alt_bench.rb +0 -0
  25. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/changelog.md +25 -2
  26. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/jrjackson.gemspec +2 -1
  27. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.14-java/lib/com/fasterxml/jackson/core/jackson-annotations/2.9.10/jackson-annotations-2.9.10.jar +0 -0
  28. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.14-java/lib/com/fasterxml/jackson/core/jackson-core/2.9.10/jackson-core-2.9.10.jar +0 -0
  29. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.14-java/lib/com/fasterxml/jackson/core/jackson-databind/2.9.10.8/jackson-databind-2.9.10.8.jar +0 -0
  30. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.14-java/lib/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.10/jackson-module-afterburner-2.9.10.jar +0 -0
  31. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/lib/jrjackson/build_info.rb +9 -5
  32. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java/lib/jrjackson/jars/jrjackson-1.2.26.jar → jrjackson-0.4.14-java/lib/jrjackson/jars/jrjackson-1.2.32.jar} +0 -0
  33. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/lib/jrjackson/jrjackson.rb +0 -0
  34. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/lib/jrjackson.rb +0 -0
  35. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/lib/jrjackson_jars.rb +8 -8
  36. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/lib/require_relative_patch.rb +0 -0
  37. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/pom.xml +8 -25
  38. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/profiling/profiled.rb +0 -0
  39. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/run_all_individual_bench.sh +0 -0
  40. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/run_jruby_individual_bench.sh +0 -0
  41. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/run_mri_individual_bench.sh +0 -0
  42. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/IParseHandler.java +0 -0
  43. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaBigDecimalValueConverter.java +0 -0
  44. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaBigIntValueConverter.java +0 -0
  45. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaConverter.java +0 -0
  46. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaFloatValueConverter.java +0 -0
  47. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaHandler.java +0 -0
  48. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JavaLongValueConverter.java +0 -0
  49. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JjParse.java +0 -0
  50. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonBase.java +0 -0
  51. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonJava.java +0 -0
  52. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonRaw.java +0 -0
  53. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonRuby.java +0 -0
  54. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonSaj.java +0 -0
  55. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonSch.java +0 -0
  56. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrJacksonService.java +0 -0
  57. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/JrParse.java +0 -0
  58. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/ParseError.java +0 -0
  59. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyAnySerializer.java +4 -4
  60. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyBigDecimalValueConverter.java +0 -0
  61. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyBigIntValueConverter.java +0 -0
  62. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyConverter.java +0 -0
  63. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyDateFormat.java +0 -0
  64. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyFloatValueConverter.java +0 -0
  65. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyHandler.java +0 -0
  66. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyIntValueConverter.java +0 -0
  67. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyJacksonModule.java +18 -6
  68. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyKeyConverter.java +0 -0
  69. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyNameConverter.java +0 -0
  70. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyObjectDeserializer.java +0 -0
  71. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyStringConverter.java +0 -0
  72. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyStringKeyConverter.java +0 -0
  73. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyStringNameConverter.java +0 -0
  74. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubySymbolKeyConverter.java +0 -0
  75. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubySymbolNameConverter.java +0 -0
  76. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/RubyUtils.java +0 -0
  77. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/SajParse.java +0 -0
  78. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/SchParse.java +0 -0
  79. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/main/java/com/jrjackson/StreamParse.java +0 -0
  80. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/src/test/java/com/jrjackson/RubyAnySerializerTest.java +0 -0
  81. data/vendor/bundle/jruby/2.5.0/gems/{jrjackson-0.4.8-java → jrjackson-0.4.14-java}/test/jrjackson_test.rb +15 -0
  82. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/bigdecimal.rb +28 -0
  83. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/complex.rb +28 -0
  84. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/core.rb +11 -0
  85. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/date.rb +34 -0
  86. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/date_time.rb +50 -0
  87. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/exception.rb +31 -0
  88. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/ostruct.rb +31 -0
  89. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/range.rb +29 -0
  90. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/rational.rb +27 -0
  91. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/regexp.rb +30 -0
  92. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/struct.rb +30 -0
  93. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/symbol.rb +25 -0
  94. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/add/time.rb +38 -0
  95. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/common.rb +484 -0
  96. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/ext/generator.jar +0 -0
  97. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/ext/parser.jar +0 -0
  98. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/ext.rb +21 -0
  99. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/generic_object.rb +70 -0
  100. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/pure/generator.rb +530 -0
  101. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/pure/parser.rb +359 -0
  102. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/pure.rb +21 -0
  103. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json/version.rb +8 -0
  104. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/lib/json.rb +62 -0
  105. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail1.json +1 -0
  106. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail10.json +1 -0
  107. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail11.json +1 -0
  108. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail12.json +1 -0
  109. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail13.json +1 -0
  110. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail14.json +1 -0
  111. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail18.json +1 -0
  112. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail19.json +1 -0
  113. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail2.json +1 -0
  114. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail20.json +1 -0
  115. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail21.json +1 -0
  116. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail22.json +1 -0
  117. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail23.json +1 -0
  118. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail24.json +1 -0
  119. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail25.json +1 -0
  120. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail27.json +2 -0
  121. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail28.json +2 -0
  122. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail3.json +1 -0
  123. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail4.json +1 -0
  124. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail5.json +1 -0
  125. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail6.json +1 -0
  126. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail7.json +1 -0
  127. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail8.json +1 -0
  128. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/fail9.json +1 -0
  129. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass1.json +56 -0
  130. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass15.json +1 -0
  131. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass16.json +1 -0
  132. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass17.json +1 -0
  133. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass2.json +1 -0
  134. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass26.json +1 -0
  135. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/fixtures/pass3.json +6 -0
  136. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/setup_variant.rb +11 -0
  137. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json.rb +519 -0
  138. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_addition.rb +196 -0
  139. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_encoding.rb +65 -0
  140. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_fixtures.rb +35 -0
  141. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_generate.rb +348 -0
  142. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_generic_object.rb +75 -0
  143. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_string_matching.rb +39 -0
  144. data/vendor/bundle/jruby/2.5.0/gems/json-1.8.6-java/tests/test_json_unicode.rb +72 -0
  145. data/vendor/bundle/jruby/2.5.0/specifications/{jrjackson-0.4.8-java.gemspec → jrjackson-0.4.14-java.gemspec} +7 -7
  146. data/vendor/bundle/jruby/2.5.0/specifications/json-1.8.6-java.gemspec +37 -0
  147. metadata +165 -66
  148. data/vendor/bundle/jruby/2.5.0/cache/jrjackson-0.4.8-java.gem +0 -0
  149. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.8-java/lib/com/fasterxml/jackson/core/jackson-annotations/2.9.7/jackson-annotations-2.9.7.jar +0 -0
  150. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.8-java/lib/com/fasterxml/jackson/core/jackson-core/2.9.7/jackson-core-2.9.7.jar +0 -0
  151. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.8-java/lib/com/fasterxml/jackson/core/jackson-databind/2.9.7/jackson-databind-2.9.7.jar +0 -0
  152. data/vendor/bundle/jruby/2.5.0/gems/jrjackson-0.4.8-java/lib/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.7/jackson-module-afterburner-2.9.7.jar +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d84626fc9f17fb9cc549552722612e2620c10ead3700689cb5625715a5441bc
4
- data.tar.gz: a49c2c03b3f97678df4a20f66ceec0ec2fdcf4fedcac732a130abe642a469057
3
+ metadata.gz: a42ad86b12842e9e684f6e155a5a18f72e976a116af35b3bd7a15b38f4ab4fe8
4
+ data.tar.gz: 7b89fcda801a9d8b2a0df34c95288d4d1599c4c08795f600aba78206fe45407c
5
5
  SHA512:
6
- metadata.gz: 015e7216df91f4bcc696038ea305936275194d87eb68f5fe5d067e704932663ab5a0cdbb8440810682964c6bfa7a9f052774065ed9fb498fc175900b77eaf161
7
- data.tar.gz: e08e06532da18aaf597937482fdee0561ea816b09f3b77c3eee259aeaaaaececcdded5e4dbd2101aacf02018167764c8e98faa7db1c9abe76e4f1094d7fc68ca
6
+ metadata.gz: 2da035c07ee249d16c5f1041f6dcc72fbe3ae39edbc161ddc602ea2af3cac3823584563d5ccb03bc0e099dc256bc0396898d26562558dcf03777a5eccc690920
7
+ data.tar.gz: d9491cd2bb02bc2f5d5e612b69ca9ba3923b773d21c37e8b2bc22d270c467552fe1569a85e0755961857f360d8a59841134156e390b4a5c536ede5299f196b89
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Beta
2
2
 
3
+ ## 0.2.1.beta
4
+
5
+ - Update plugin to fail fast on register and throw more user-friendly error on invalid URL for
6
+ ``scalyr_server`` configuration option value and other fatal server errors (e.g. invalid
7
+ hostname).
8
+ - On plugin init / register we now perform connectivity check and verify that we can talk to
9
+ Scalyr API and validate that the API key is valid. This ensures that the plugin doesn't start and
10
+ start consuming events until we can successfully perform a connectivity check. This means
11
+ we can't end up in situation when we could potentially drop some events to the ground in case of
12
+ an invalid API key or similar when reaching retry limit and DLQ disabled. If you want to disable
13
+ this check on register, you can set ``perform_connectivity_check`` config option to ``false``.
14
+
15
+ ## 0.2.0.beta, 0.2.0
16
+
17
+ - Fix a bug and correctly handle ``serverHost`` event level attribute. Now if an event contains
18
+ ``serverHost`` attribute, this attribute will be correctly set on the event level and available for
19
+ "Sources" filtering in the UI.
20
+ - Plugin doesn't set ``serverHost`` attribute with a fixed value of ``Logstash`` on each event
21
+ level anymore. If you still want this behavior, you can achieve that with logstash mutate filter.
22
+ - Session level ``serverHost`` value now defaults to logstash aggregator node hostname
23
+ (``use_hostname_for_serverhost`` config option now defaults to true).
24
+ - ``host`` attribute is not removed by default from all the events. By default, logstash adds
25
+ ``host`` attribute which contains logstash aggregator host to each event. This is now redundant
26
+ and unncessary with the fixed and improved serverHost behavior (host and serverHost would contain
27
+ the same value by default). If you want to change this behavior and and still include ``host``
28
+ attribute on each event you can do that by setting ``remove_host_attribute_from_events`` config
29
+ option to false.
30
+
31
+ ## 0.1.26.beta
32
+ - Add support for new ``json_library`` config option. Valid values are ``stdlib`` (default) are ``jrjackson``. The later may offer 2-4x faster JSON serialization.
33
+
3
34
  ## 0.1.23.beta
4
35
  - Add testing support for disabling estimation of serialized event size for each event in the batch.
5
36
 
data/Gemfile CHANGED
@@ -12,9 +12,13 @@ end
12
12
 
13
13
  group :test do
14
14
  gem "webmock"
15
+
16
+ # Require the specific version of `json` used in logstash while testing
17
+ gem 'json', '1.8.6'
15
18
  end
16
19
 
17
20
  gem 'pry'
18
21
  gem 'pry-nav'
19
22
  gem 'quantile', '~> 0.2.1'
20
23
  gem 'manticore', '~> 0.7.1', platform: :jruby
24
+ gem 'jrjackson', '~> 0.4.14', platform: :jruby
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
-
2
1
  [![CircleCI](https://circleci.com/gh/scalyr/logstash-output-scalyr.svg?style=svg)](https://circleci.com/gh/scalyr/logstash-output-scalyr)
3
2
 
4
- # [Scalyr output plugin for Logstash (Beta release)]
3
+ # [Scalyr output plugin for Logstash]
5
4
 
6
5
  This plugin implements a Logstash output plugin that uploads data to [Scalyr](http://www.scalyr.com).
7
6
 
@@ -10,7 +9,9 @@ You can view documentation for this plugin [on the Scalyr website](https://app.s
10
9
  # Quick start
11
10
 
12
11
  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.22.beta.gem` or follow the latest official instructions on working with plugins from Logstash.
12
+ 2. Install the gem into a Logstash installation, run `/usr/share/logstash/bin/logstash-plugin install logstash-output-scalyr-0.2.0.gem`
13
+ or follow the latest official instructions on working with plugins from Logstash. As an alternative, you can directly install latest
14
+ stable version from RubyGems - ``/usr/share/logstash/bin/logstash-plugin --version 0.2.0 logstash-output-scalyr``
14
15
  3. Configure the output plugin (e.g. add it to a pipeline .conf)
15
16
  4. Restart Logstash
16
17
 
@@ -40,6 +41,51 @@ output {
40
41
 
41
42
  In the above example, the Logstash pipeline defines a file input that reads from `/var/log/messages`. Log events from this source have the `host` and `path` fields. The pipeline then outputs to the scalyr plugin, which in this example is configured to remap `host`->`serverHost` and `path`->`logfile`, thus facilitating filtering in the Scalyr UI.
42
43
 
44
+ ## Notes on serverHost attribute handling
45
+
46
+ > Some of this functionality has been fixed and changed in the v0.2.0 release. In previous
47
+ versions, plugin added ``serverHost`` attribute with a value of ``Logstash`` to each event and
48
+ this attribute was not handled correctly - it was treated as a regular event level attribute
49
+ and not a special attribute which can be used for Source functionality and filtering.
50
+
51
+ By default this plugin will set ``serverHost`` for all the events in a batch to match hostname of
52
+ the logstash node where the output plugin is running.
53
+
54
+ You can change that either by setting ``serverHost`` attribute in the ``server_attributes`` config
55
+ option hash or by setting ``serverHost`` attribute on the event level via logstash record attribute.
56
+
57
+ In both scenarios, you will be able to utilize this value for "Sources" functionality and filterin
58
+ in the Scalyr UI.
59
+
60
+ For example:
61
+
62
+ 1. Define static value for all the events handled by specific plugin instance
63
+
64
+ ```
65
+ output {
66
+ scalyr {
67
+ api_write_token => 'SCALYR_API_KEY'
68
+ server_attributes => {'serverHost' => 'my-host-1'}
69
+ }
70
+ }
71
+ ```
72
+
73
+ 2. Define static value on the event level which is set via logstash filter
74
+
75
+ ```
76
+ mutate {
77
+ add_field => { "serverHost" => "my hostname" }
78
+ }
79
+ ```
80
+
81
+ 3. Define dynamic value on the event level which is set via logstash filter
82
+
83
+ ```
84
+ mutate {
85
+ add_field => { "serverHost" => "%{[host][name]}" }
86
+ }
87
+ ```
88
+
43
89
  ## Options
44
90
 
45
91
  - 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
@@ -72,7 +118,7 @@ In the above example, the Logstash pipeline defines a file input that reads from
72
118
  - Related to the server_attributes dictionary above, if you do not define the 'serverHost' key in server_attributes,
73
119
  the plugin will automatically set it, using the aggregator hostname as value, if this value is true.
74
120
 
75
- `config :use_hostname_for_serverhost, :validate => :boolean, :default => false`
121
+ `config :use_hostname_for_serverhost, :validate => :boolean, :default => true`
76
122
 
77
123
  ---
78
124
 
@@ -393,5 +439,82 @@ bundle exec rspec
393
439
  bundle exec rake publish_gem
394
440
  ```
395
441
 
442
+ Or as an alternative if ``rake publish_gem`` task doesn't appear to work for whatever reason
443
+ (``publish_gem`` logstash Rake task silently swallows all the errors):
444
+
445
+ ```
446
+ rm -rf vendor/
447
+ bundle check --path vendor/bundle || bundle install --deployment
448
+ curl -u RUBY_USER:RUBY_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
449
+ chmod 0600 ~/.gem/credentials
450
+ bundle exec rake vendor
451
+ bundle exec rspec
452
+ rvm use jruby
453
+ bundle exec gem build logstash-output-scalyr.gemspec
454
+ bundle exec gem push logstash-output-scalyr-<version>.gem
455
+ ```
456
+
396
457
  `RUBY_USER` and `RUBY_PASSWORD` should be replaced with the username and password to the RubyGems.org account you wish to release to,
397
458
  these credentials should be found in Keeper.
459
+
460
+ # Testing Plugin Changes
461
+
462
+ This section describes how to test the plugin and changes using docker compose setup from
463
+ lostash-config-tester repo available at https://github.com/Kami/logstash-config-tester.
464
+
465
+ This repo has been forked and already contains some changes which make testing the plugin
466
+ easier.
467
+
468
+ The logstash configuration in that repo is set up to receive records encoded as JSON via
469
+ standard input, decode the JSON into the event object and print it to stdout + send it
470
+ to the Scalyr output.
471
+
472
+ ```bash
473
+ # 0. Clone the tester repo
474
+ git clone https://github.com/Kami/logstash-config-tester ~/
475
+
476
+ # 1. Build the plugin
477
+ gem build logstash-output-scalyr.gemspec
478
+
479
+ # 2. Copy it to the config test repo
480
+ cp logstash-output-scalyr-0.2.0.gem ~/logstash-config-test/logstash-output-scalyr.gem
481
+
482
+ # 3. Build docker image with the latest dev version of the plugin (may take a while)
483
+ docker-compose build
484
+
485
+ # 4. Configure API key in docker-compose.yml and make any changes to plugin config in
486
+ # pipeline/scalyr_output.conf.j2, if necessary
487
+ vim docker-compose.yml
488
+
489
+ vim pipeline/scalyr_output.conf.j2
490
+
491
+ # 4. Run logstash with the stdin input and stdout + scalyr output
492
+ docker-compose run logstash
493
+ ```
494
+
495
+ A couple of things to keep in mind:
496
+
497
+ 1. Logstash log level is set to debug which is quite verbose, but it makes troubleshooting and
498
+ testing easier.
499
+ 2. Plugin accepts records (events) as JSON via standard input. This means to inject the mock
500
+ event you can simply copy the JSON event representation string to stdin and press enter. If you
501
+ want to submit multiples events to be handled as a single batch, paste each event one at a time
502
+ and press enter at the end. Logstash pipeline has been configured to wait up to 5 seconds before
503
+ handling the batch which should give you enough time to test batches with multiple events (this
504
+ setting can be adjusted in ``config/logstash.yml`` - ``pipeline.batch.delay``, if needed)
505
+
506
+ Example values you can enter into stdin:
507
+
508
+ 1. Single event batch
509
+
510
+ ```javascript
511
+ {"foo": "bar", "message": "test logstash"}
512
+ ```
513
+
514
+ 2. Batch with 3 events
515
+
516
+ ```javascript
517
+ {"serverHost": "host-1", "bar": "baz", "message": "test logstash 1"}
518
+ {"serverHost": "host-2", "bar": "baz", "message": "test logstash 2"}
519
+ {"bar": "baz", "message": "test logstash 3"}
520
+ ```