logstash-output-scalyr 0.1.9 → 0.1.14.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/Gemfile +5 -0
- data/README.md +2 -2
- data/lib/logstash/outputs/scalyr.rb +265 -142
- data/lib/scalyr/common/client.rb +80 -57
- data/lib/scalyr/common/util.rb +7 -0
- data/lib/scalyr/constants.rb +2 -0
- data/logstash-output-scalyr.gemspec +1 -1
- data/spec/logstash/outputs/scalyr_integration_spec.rb +187 -8
- data/spec/logstash/outputs/scalyr_spec.rb +12 -6
- data/vendor/bundle/jruby/2.5.0/cache/addressable-2.7.0.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/crack-0.4.5.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/hashdiff-1.0.1.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/public_suffix-4.0.6.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/rexml-3.2.5.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/cache/webmock-3.13.0.gem +0 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/CHANGELOG.md +235 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Gemfile +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/LICENSE.txt +202 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/README.md +121 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/Rakefile +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/data/unicode.data +0 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable.rb +4 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/native.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/idna/pure.rb +676 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/template.rb +1045 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/uri.rb +2529 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/lib/addressable/version.rb +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/idna_spec.rb +300 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/net_http_compat_spec.rb +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/rack_mount_compat_spec.rb +106 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/security_spec.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/template_spec.rb +1451 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/addressable/uri_spec.rb +6603 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/spec/spec_helper.rb +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/clobber.rake +4 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/gem.rake +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/git.rake +47 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/metrics.rake +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/rspec.rake +23 -0
- data/vendor/bundle/jruby/2.5.0/gems/addressable-2.7.0/tasks/yard.rake +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack.rb +7 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/json.rb +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/util.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/version.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/crack-0.4.5/lib/crack/xml.rb +238 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Gemfile +8 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/LICENSE +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/README.md +276 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/Rakefile +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/changelog.md +100 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/hashdiff.gemspec +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/compare_hashes.rb +69 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/diff.rb +177 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs.rb +66 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/lcs_compare_arrays.rb +32 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/linear_compare_array.rb +159 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/util.rb +155 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/lib/hashdiff/version.rb +5 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/best_diff_spec.rb +75 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_array_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/diff_spec.rb +360 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/lcs_spec.rb +76 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/linear_compare_array_spec.rb +50 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/patch_spec.rb +185 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/readme_spec.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/hashdiff/util_spec.rb +116 -0
- data/vendor/bundle/jruby/2.5.0/gems/hashdiff-1.0.1/spec/spec_helper.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/2.0-Upgrade.md +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/CHANGELOG.md +406 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Gemfile +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/LICENSE.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/README.md +207 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/Rakefile +51 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/SECURITY.md +104 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/bin/console +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/codecov.yml +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/data/list.txt +13380 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix.rb +179 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/errors.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/list.rb +247 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/rule.rb +350 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/lib/public_suffix/version.rb +13 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/public_suffix.gemspec +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/acceptance_test.rb +131 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find.rb +66 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_find_all.rb +102 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_names.rb +91 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select.rb +26 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_select_incremental.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/benchmarks/bm_valid.rb +101 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/domain_profiler.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/find_profiler_jp.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/initialization_profiler.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/list_profsize.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/profilers/object_binsize.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/psl_test.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/test_helper.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/tests.txt +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/domain_test.rb +106 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/errors_test.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/list_test.rb +241 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/public_suffix_test.rb +188 -0
- data/vendor/bundle/jruby/2.5.0/gems/public_suffix-4.0.6/test/unit/rule_test.rb +222 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/NEWS.md +178 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/README.md +48 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/context.rdoc +143 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/child.rdoc +87 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/document.rdoc +276 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/element.rdoc +602 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/node.rdoc +97 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/rdoc/parent.rdoc +267 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/child_toc.rdoc +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/document_toc.rdoc +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/element_toc.rdoc +55 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/master_toc.rdoc +135 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/node_toc.rdoc +16 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/doc/rexml/tasks/tocs/parent_toc.rdoc +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
- data/vendor/bundle/jruby/2.5.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/CHANGELOG.md +1894 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Gemfile +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/LICENSE +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/README.md +1176 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/Rakefile +38 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock.rb +59 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/api.rb +109 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/assertion_failure.rb +11 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/callback_registry.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/config.rb +18 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/cucumber.rb +10 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/deprecation.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/errors.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/async_http_client_adapter.rb +216 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/curb_adapter.rb +351 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +231 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/excon_adapter.rb +165 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/client.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/request.rb +16 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/response.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/streamer.rb +29 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb/webmock.rb +68 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/http_rb_adapter.rb +37 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/httpclient_adapter.rb +259 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/manticore_adapter.rb +145 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http.rb +385 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/net_http_response.rb +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/patron_adapter.rb +130 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +174 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/any_arg_matcher.rb +13 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_argument_matcher.rb +21 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_excluding_matcher.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/matchers/hash_including_matcher.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/minitest.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rack_response.rb +69 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_body_diff.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_execution_verifier.rb +77 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_pattern.rb +405 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_registry.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_signature_snippet.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/request_stub.rb +100 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/response.rb +159 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/responses_sequence.rb +40 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec.rb +42 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/request_pattern_matcher.rb +78 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/rspec/matchers/webmock_matcher.rb +67 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_registry.rb +82 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/stub_request_snippet.rb +38 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/test_unit.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_counter.rb +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_keys_stringifier.rb +25 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/hash_validator.rb +17 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/headers.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/json.rb +67 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/query_mapper.rb +281 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/uri.rb +111 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/values_stringifier.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/util/version_checker.rb +111 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/version.rb +3 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/lib/webmock/webmock.rb +163 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_helper.rb +34 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/test_webmock.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/minitest/webmock_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/async_http_client/async_http_client_spec.rb +375 -0
- 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
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec.rb +499 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/curb/curb_spec_helper.rb +147 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/em_http_request/em_http_request_spec.rb +462 -0
- 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
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec.rb +77 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/excon/excon_spec_helper.rb +52 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec.rb +93 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/http_rb/http_rb_spec_helper.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec.rb +217 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/httpclient/httpclient_spec_helper.rb +57 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec.rb +107 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/manticore/manticore_spec_helper.rb +35 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_shared.rb +153 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec.rb +369 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/net_http_spec_helper.rb +64 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/net_http/real_net_http_spec.rb +20 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec.rb +125 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/patron/patron_spec_helper.rb +54 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +313 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/callbacks.rb +148 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/complex_cross_concern_behaviors.rb +36 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/enabling_and_disabling_webmock.rb +95 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb +15 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/request_expectations.rb +930 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/returning_declared_responses.rb +409 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/stubbing_requests.rb +678 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +135 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/webmock_shared.rb +41 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/fixtures/test.txt +1 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/quality_spec.rb +84 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/spec_helper.rb +48 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/example_curl_output.txt +22 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/failures.rb +9 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/my_rack_app.rb +53 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/network_connection.rb +19 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/support/webmock_server.rb +70 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/api_spec.rb +175 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/errors_spec.rb +129 -0
- 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
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_excluding_matcher_spec.rb +61 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/matchers/hash_including_matcher_spec.rb +87 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/rack_response_spec.rb +112 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_body_diff_spec.rb +90 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_execution_verifier_spec.rb +208 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_pattern_spec.rb +736 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_registry_spec.rb +95 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_snippet_spec.rb +89 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_signature_spec.rb +155 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/request_stub_spec.rb +199 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/response_spec.rb +286 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_registry_spec.rb +103 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/stub_request_snippet_spec.rb +115 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_counter_spec.rb +39 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb +27 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/headers_spec.rb +28 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/json_spec.rb +33 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/query_mapper_spec.rb +157 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/uri_spec.rb +371 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/version_checker_spec.rb +65 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/webmock_spec.rb +60 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/http_request.rb +24 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/shared_test.rb +108 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_helper.rb +23 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/test/test_webmock.rb +12 -0
- data/vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/webmock.gemspec +54 -0
- data/vendor/bundle/jruby/2.5.0/specifications/addressable-2.7.0.gemspec +39 -0
- data/vendor/bundle/jruby/2.5.0/specifications/crack-0.4.5.gemspec +32 -0
- data/vendor/bundle/jruby/2.5.0/specifications/hashdiff-1.0.1.gemspec +46 -0
- data/vendor/bundle/jruby/2.5.0/specifications/public_suffix-4.0.6.gemspec +24 -0
- data/vendor/bundle/jruby/2.5.0/specifications/rexml-3.2.5.gemspec +42 -0
- data/vendor/bundle/jruby/2.5.0/specifications/webmock-3.13.0.gemspec +85 -0
- metadata +311 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1af6e37035c37c270036487e9b939f40e8454d39ddea9983a737f409957e0747
|
4
|
+
data.tar.gz: 95438909311aa595d2d4e771424765f3705cdc649225ca81c053e3b9c129b183
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a9f542cfaaf8bb9e84ebf976694c548e153e1e170417309644b9206bf4df2ba8844447cbb2b0afd4ba8d03922688f6348a6fb77a6c8489a3f2a49bb873fed9
|
7
|
+
data.tar.gz: 514fab3aa32f39e1ebe6e4bf164a9b9f648b82e7aa861d9cbc2edd6d44d9c6b4d9d3ea9b7c281ae26bf719e4373bde6059f220033dc660821a369b6186180798
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Beta
|
2
2
|
|
3
|
+
## 0.1.14.beta
|
4
|
+
- Add configurable max retries for requests when running into errors.
|
5
|
+
- Add ability to send messages to the dead letter queue if we exhaust all retries and if it is configured.
|
6
|
+
- Log truncated error body for all errors to help with debugging.
|
7
|
+
|
8
|
+
## 0.1.13
|
9
|
+
- Fix synchronization of status message sending code to avoid duplicate logs.
|
10
|
+
|
11
|
+
## 0.1.12
|
12
|
+
- Add logging of successful request retries after an error for additional clarity.
|
13
|
+
- Add debug level logging of request body on error.
|
14
|
+
|
15
|
+
## 0.1.11.beta
|
16
|
+
- Fixes to retry mechanisms.
|
17
|
+
- More thorough catching of events, preferring to retry requests rather than crashing the plugin.
|
18
|
+
|
19
|
+
## 0.1.10.beta
|
20
|
+
|
21
|
+
- Switch to shared concurrency to allow the use of multiple worker threads for increased
|
22
|
+
throughput.
|
23
|
+
- Switch HTTP client library to `manticore` to work better with new shared concurrency.
|
24
|
+
|
3
25
|
## 0.1.9
|
4
26
|
|
5
27
|
- Add support for logging status messages with metrics to stdout in addition to sending this
|
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.
|
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
|
-
`
|
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
|
|
@@ -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 '
|
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
|
-
|
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
|
@@ -87,13 +78,22 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
87
78
|
|
88
79
|
# Initial interval in seconds between bulk retries. Doubled on each retry up to `retry_max_interval`
|
89
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
|
90
85
|
|
91
86
|
# Set max interval in seconds between bulk retries.
|
92
87
|
config :retry_max_interval, :validate => :number, :default => 64
|
93
88
|
|
94
|
-
#
|
89
|
+
# Whether or not to verify the connection to Scalyr, only set to false for debugging.
|
95
90
|
config :ssl_verify_peer, :validate => :boolean, :default => true
|
96
|
-
|
91
|
+
|
92
|
+
# Path to SSL bundle file.
|
93
|
+
config :ssl_ca_bundle_path, :validate => :string, :default => "/etc/ssl/certs/ca-bundle.crt"
|
94
|
+
|
95
|
+
# If we should append our built-in Scalyr cert to the one we find at `ssl_ca_bundle_path`.
|
96
|
+
config :append_builtin_cert, :validate => :boolean, :default => true
|
97
97
|
|
98
98
|
config :max_request_buffer, :validate => :number, :default => 5500000 # echee TODO: eliminate?
|
99
99
|
config :force_message_encoding, :validate => :string, :default => nil
|
@@ -132,6 +132,24 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
132
132
|
# Whether or not to create fresh quantile estimators after a status send. Depending on what you want to gather from
|
133
133
|
# these stas this might be wanted or not.
|
134
134
|
config :flush_quantile_estimates_on_status_send, :validate => :boolean, :default => false
|
135
|
+
|
136
|
+
# Causes this plugin to act as if it successfully uploaded the logs, while actually returning as quickly as possible
|
137
|
+
# after no work being done.
|
138
|
+
config :noop_mode, :validate => :boolean, :default => false
|
139
|
+
|
140
|
+
# Manticore related options
|
141
|
+
config :http_connect_timeout, :validate => :number, :default => 10
|
142
|
+
config :http_socket_timeout, :validate => :number, :default => 10
|
143
|
+
config :http_request_timeout, :validate => :number, :default => 60
|
144
|
+
config :http_pool_max, :validate => :number, :default => 50
|
145
|
+
config :http_pool_max_per_route, :validate => :number, :default => 25
|
146
|
+
|
147
|
+
def initialize(*params)
|
148
|
+
super
|
149
|
+
# Request statistics are accumulated across multiple threads and must be accessed through a mutex
|
150
|
+
@stats_lock = Mutex.new
|
151
|
+
@send_stats = Mutex.new
|
152
|
+
end
|
135
153
|
|
136
154
|
def close
|
137
155
|
@running = false
|
@@ -140,6 +158,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
140
158
|
|
141
159
|
public
|
142
160
|
def register
|
161
|
+
# This prng is used exclusively to determine when to sample statistics and no security related purpose, for this
|
162
|
+
# reason we do not ensure thread safety for it.
|
143
163
|
@prng = Random.new
|
144
164
|
|
145
165
|
if @event_metrics_sample_rate < 0 or @event_metrics_sample_rate > 1
|
@@ -223,12 +243,12 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
223
243
|
@running = true
|
224
244
|
@client_session = Scalyr::Common::Client::ClientSession.new(
|
225
245
|
@logger, @add_events_uri,
|
226
|
-
@compression_type, @compression_level,
|
227
|
-
@
|
228
|
-
@
|
246
|
+
@compression_type, @compression_level, @ssl_verify_peer, @ssl_ca_bundle_path, @append_builtin_cert,
|
247
|
+
@record_stats_for_status, @flush_quantile_estimates_on_status_send,
|
248
|
+
@http_connect_timeout, @http_socket_timeout, @http_request_timeout, @http_pool_max, @http_pool_max_per_route
|
229
249
|
)
|
230
250
|
|
231
|
-
@logger.info("Started Scalyr output plugin", :class => self.class.name)
|
251
|
+
@logger.info(sprintf("Started Scalyr output plugin (%s)." % [PLUGIN_VERSION]), :class => self.class.name)
|
232
252
|
|
233
253
|
# Finally, send a status line to Scalyr
|
234
254
|
send_status
|
@@ -241,7 +261,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
241
261
|
:multi_receive_duration_secs => Quantile::Estimator.new,
|
242
262
|
:multi_receive_event_count => Quantile::Estimator.new,
|
243
263
|
:event_attributes_count => Quantile::Estimator.new,
|
244
|
-
:flatten_values_duration_secs => Quantile::Estimator.new
|
264
|
+
:flatten_values_duration_secs => Quantile::Estimator.new,
|
265
|
+
:batches_per_multi_receive => Quantile::Estimator.new
|
245
266
|
}
|
246
267
|
end
|
247
268
|
|
@@ -257,87 +278,154 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
257
278
|
#
|
258
279
|
public
|
259
280
|
def multi_receive(events)
|
260
|
-
|
281
|
+
# Just return and pretend we did something if running in noop mode
|
282
|
+
return events if @noop_mode
|
261
283
|
|
262
|
-
|
263
|
-
|
284
|
+
begin
|
285
|
+
start_time = Time.now.to_f
|
264
286
|
|
265
|
-
|
266
|
-
|
267
|
-
total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
|
287
|
+
multi_event_request_array = build_multi_event_request_array(events)
|
288
|
+
# Loop over all array of multi-event requests, sending each multi-event to Scalyr
|
268
289
|
|
269
|
-
|
270
|
-
|
290
|
+
sleep_interval = @retry_initial_interval
|
291
|
+
batch_num = 1
|
292
|
+
total_batches = multi_event_request_array.length unless multi_event_request_array.nil?
|
271
293
|
|
272
|
-
|
273
|
-
|
294
|
+
result = []
|
295
|
+
records_count = events.to_a.length
|
296
|
+
|
297
|
+
while !multi_event_request_array.to_a.empty?
|
274
298
|
multi_event_request = multi_event_request_array.pop
|
275
|
-
#
|
276
|
-
#
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
299
|
+
# Variables to hold information about exceptions we run into, and our handling of retries for this request. We
|
300
|
+
# track this to log it when the retries succeed so we can be sure logs are going through.
|
301
|
+
# General exception info we log in the error
|
302
|
+
exc_data = nil
|
303
|
+
# Whether the exception is commonly retried or not, for determining log level
|
304
|
+
exc_commonly_retried = false
|
305
|
+
# Count of retries attempted for this request
|
306
|
+
exc_retries = 0
|
307
|
+
# Total time spent sleeping while retrying this request due to backoff
|
308
|
+
exc_sleep = 0
|
309
|
+
begin
|
310
|
+
# For some reason a retry on the multi_receive may result in the request array containing `nil` elements, we
|
311
|
+
# ignore these.
|
312
|
+
if !multi_event_request.nil?
|
313
|
+
@client_session.post_add_events(multi_event_request[:body], false, multi_event_request[:serialization_duration])
|
314
|
+
|
315
|
+
sleep_interval = @retry_initial_interval
|
316
|
+
batch_num += 1
|
317
|
+
result.push(multi_event_request)
|
318
|
+
end
|
319
|
+
|
320
|
+
rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
|
321
|
+
sleep_interval = sleep_for(sleep_interval)
|
322
|
+
exc_sleep += sleep_interval
|
323
|
+
exc_retries += 1
|
324
|
+
message = "Error uploading to Scalyr (will backoff-retry)"
|
325
|
+
exc_data = {
|
326
|
+
:error_class => e.e_class,
|
327
|
+
:url => e.url.to_s,
|
328
|
+
:message => e.message,
|
329
|
+
:batch_num => batch_num,
|
330
|
+
:total_batches => total_batches,
|
331
|
+
:record_count => multi_event_request[:record_count],
|
332
|
+
:payload_size => multi_event_request[:body].bytesize,
|
333
|
+
:will_retry_in_seconds => sleep_interval,
|
334
|
+
}
|
335
|
+
exc_data[:code] = e.code if e.code
|
336
|
+
if @logger.debug? and e.body
|
337
|
+
exc_data[:body] = e.body
|
338
|
+
elsif e.body
|
339
|
+
exc_data[:body] = Scalyr::Common::Util.truncate(e.body, 512)
|
340
|
+
end
|
341
|
+
exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
|
342
|
+
if e.is_commonly_retried?
|
343
|
+
# well-known retriable errors should be debug
|
344
|
+
@logger.debug(message, exc_data)
|
345
|
+
exc_commonly_retried = true
|
346
|
+
else
|
347
|
+
# all other failed uploads should be errors
|
348
|
+
@logger.error(message, exc_data)
|
349
|
+
exc_commonly_retried = false
|
350
|
+
end
|
351
|
+
retry if @running and exc_retries < @max_retries
|
352
|
+
log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
|
353
|
+
next
|
354
|
+
|
355
|
+
rescue => e
|
356
|
+
# Any unexpected errors should be fully logged
|
357
|
+
@logger.error(
|
358
|
+
"Unexpected error occurred while uploading to Scalyr (will backoff-retry)",
|
359
|
+
:error_message => e.message,
|
360
|
+
:error_class => e.class.name,
|
361
|
+
:backtrace => e.backtrace
|
362
|
+
)
|
363
|
+
@logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
|
364
|
+
sleep_interval = sleep_for(sleep_interval)
|
365
|
+
exc_data = {
|
366
|
+
:error_message => e.message,
|
367
|
+
:error_class => e.class.name,
|
368
|
+
:backtrace => e.backtrace,
|
369
|
+
:multi_event_request => multi_event_request
|
370
|
+
}
|
371
|
+
exc_sleep += sleep_interval
|
372
|
+
exc_retries += 1
|
373
|
+
retry if @running and exc_retries < @max_retries
|
374
|
+
log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
|
375
|
+
next
|
281
376
|
end
|
282
377
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
@logger.error "Discarding buffer chunk without retrying."
|
291
|
-
|
292
|
-
rescue Scalyr::Common::Client::ServerError, Scalyr::Common::Client::ClientError => e
|
293
|
-
sleep_interval = sleep_for(sleep_interval)
|
294
|
-
message = "Error uploading to Scalyr (will backoff-retry)"
|
295
|
-
exc_data = {
|
296
|
-
:url => e.url.to_s,
|
297
|
-
:message => e.message,
|
298
|
-
:batch_num => batch_num,
|
299
|
-
:total_batches => total_batches,
|
300
|
-
:record_count => multi_event_request[:record_count],
|
301
|
-
:payload_size => multi_event_request[:body].bytesize,
|
302
|
-
:will_retry_in_seconds => sleep_interval,
|
303
|
-
}
|
304
|
-
exc_data[:code] = e.response_code if e.code
|
305
|
-
exc_data[:body] = e.response_body if @logger.debug? and e.body
|
306
|
-
exc_data[:payload] = "\tSample payload: #{request[:body][0,1024]}..." if @logger.debug?
|
307
|
-
if e.is_commonly_retried?
|
308
|
-
# well-known retriable errors should be debug
|
309
|
-
@logger.debug(message, exc_data)
|
310
|
-
else
|
311
|
-
# all other failed uploads should be errors
|
312
|
-
@logger.error(message, exc_data)
|
378
|
+
if !exc_data.nil?
|
379
|
+
message = "Retry successful after error."
|
380
|
+
if exc_commonly_retried
|
381
|
+
@logger.debug(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
|
382
|
+
else
|
383
|
+
@logger.info(message, :error_data => exc_data, :retries => exc_retries, :sleep_time => exc_sleep)
|
384
|
+
end
|
313
385
|
end
|
314
|
-
|
386
|
+
end
|
315
387
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
)
|
324
|
-
@logger.debug("Failed multi_event_request", :multi_event_request => multi_event_request)
|
325
|
-
sleep_interval = sleep_for(sleep_interval)
|
326
|
-
retry if @running
|
388
|
+
if records_count > 0
|
389
|
+
@stats_lock.synchronize do
|
390
|
+
@multi_receive_statistics[:total_multi_receive_secs] += (Time.now.to_f - start_time)
|
391
|
+
@plugin_metrics[:multi_receive_duration_secs].observe(Time.now.to_f - start_time)
|
392
|
+
@plugin_metrics[:multi_receive_event_count].observe(records_count)
|
393
|
+
@plugin_metrics[:batches_per_multi_receive].observe(total_batches)
|
394
|
+
end
|
327
395
|
end
|
328
|
-
end
|
329
396
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
397
|
+
send_status
|
398
|
+
return result
|
399
|
+
|
400
|
+
rescue => e
|
401
|
+
# Any unexpected errors should be fully logged
|
402
|
+
@logger.error(
|
403
|
+
"Unexpected error occurred while executing multi_receive.",
|
404
|
+
:error_message => e.message,
|
405
|
+
:error_class => e.class.name,
|
406
|
+
:backtrace => e.backtrace
|
407
|
+
)
|
334
408
|
end
|
335
|
-
|
336
|
-
send_status
|
337
|
-
return result
|
338
409
|
end # def multi_receive
|
339
410
|
|
340
411
|
|
412
|
+
def log_retry_failure(multi_event_request, exc_data, exc_retries, exc_sleep)
|
413
|
+
message = "Failed to send #{multi_event_request[:logstash_events].length} events after #{exc_retries} tries."
|
414
|
+
sample_events = Array.new
|
415
|
+
multi_event_request[:logstash_events][0,5].each {|l_event|
|
416
|
+
sample_events << Scalyr::Common::Util.truncate(l_event.to_hash.to_json, 256)
|
417
|
+
}
|
418
|
+
@logger.error(message, :error_data => exc_data, :sample_events => sample_events, :retries => exc_retries, :sleep_time => exc_sleep)
|
419
|
+
if @dlq_writer
|
420
|
+
multi_event_request[:logstash_events].each {|l_event|
|
421
|
+
@dlq_writer.write(l_event, "#{exc_data[:message]}")
|
422
|
+
}
|
423
|
+
else
|
424
|
+
@logger.warn("Deal letter queue not configured, dropping #{multi_event_request[:logstash_events].length} events after #{exc_retries} tries.", :sample_events => sample_events)
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
428
|
+
|
341
429
|
# Builds an array of multi-event requests from LogStash events
|
342
430
|
# Each array element is a request that groups multiple events (to be posted to Scalyr's addEvents endpoint)
|
343
431
|
#
|
@@ -366,6 +454,8 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
366
454
|
current_threads = Hash.new
|
367
455
|
# Create a Scalyr event object for each record in the chunk
|
368
456
|
scalyr_events = Array.new
|
457
|
+
# Track the logstash events in each chunk to send them to the dlq in case of an error
|
458
|
+
l_events = Array.new
|
369
459
|
|
370
460
|
thread_ids = Hash.new
|
371
461
|
next_id = 1 #incrementing thread id for the session
|
@@ -501,10 +591,12 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
501
591
|
end
|
502
592
|
|
503
593
|
if should_sample_event_metrics
|
504
|
-
@
|
594
|
+
@stats_lock.synchronize do
|
595
|
+
@plugin_metrics[:event_attributes_count].observe(record.count)
|
505
596
|
|
506
|
-
|
507
|
-
|
597
|
+
if @flatten_nested_values
|
598
|
+
@plugin_metrics[:flatten_values_duration_secs].observe(flatten_nested_values_duration)
|
599
|
+
end
|
508
600
|
end
|
509
601
|
end
|
510
602
|
|
@@ -555,9 +647,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
555
647
|
# make sure we always have at least one event
|
556
648
|
if scalyr_events.size == 0
|
557
649
|
scalyr_events << scalyr_event
|
650
|
+
l_events << l_event
|
558
651
|
append_event = false
|
559
652
|
end
|
560
|
-
multi_event_request = self.create_multi_event_request(scalyr_events, current_threads, logs)
|
653
|
+
multi_event_request = self.create_multi_event_request(scalyr_events, l_events, current_threads, logs)
|
561
654
|
multi_event_request_array << multi_event_request
|
562
655
|
|
563
656
|
total_bytes = 0
|
@@ -565,19 +658,21 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
565
658
|
logs = Hash.new
|
566
659
|
logs_ids = Hash.new
|
567
660
|
scalyr_events = Array.new
|
661
|
+
l_events = Array.new
|
568
662
|
end
|
569
663
|
|
570
664
|
# if we haven't consumed the current event already
|
571
665
|
# add it to the end of our array and keep track of the json bytesize
|
572
666
|
if append_event
|
573
667
|
scalyr_events << scalyr_event
|
668
|
+
l_events << l_event
|
574
669
|
total_bytes += add_bytes
|
575
670
|
end
|
576
671
|
|
577
672
|
}
|
578
673
|
|
579
674
|
# create a final request with any left over events
|
580
|
-
multi_event_request = self.create_multi_event_request(scalyr_events, current_threads, logs)
|
675
|
+
multi_event_request = self.create_multi_event_request(scalyr_events, l_events, current_threads, logs)
|
581
676
|
multi_event_request_array << multi_event_request
|
582
677
|
multi_event_request_array
|
583
678
|
end
|
@@ -595,10 +690,10 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
595
690
|
# A request comprises multiple Scalyr Events. This function creates a request hash for
|
596
691
|
# final upload to Scalyr (from an array of events, and an optional hash of current threads)
|
597
692
|
# Note: The request body field will be json-encoded.
|
598
|
-
def create_multi_event_request(scalyr_events, current_threads, current_logs)
|
693
|
+
def create_multi_event_request(scalyr_events, logstash_events, current_threads, current_logs)
|
599
694
|
|
600
695
|
body = {
|
601
|
-
:session => @session_id,
|
696
|
+
:session => @session_id + Thread.current.object_id.to_s,
|
602
697
|
:token => @api_write_token,
|
603
698
|
:events => scalyr_events,
|
604
699
|
}
|
@@ -631,40 +726,49 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
631
726
|
serialized_body = body.to_json
|
632
727
|
end_time = Time.now.to_f
|
633
728
|
serialization_duration = end_time - start_time
|
634
|
-
{
|
729
|
+
{
|
730
|
+
:body => serialized_body, :record_count => scalyr_events.size, :serialization_duration => serialization_duration,
|
731
|
+
:logstash_events => logstash_events
|
732
|
+
}
|
635
733
|
|
636
734
|
end # def create_multi_event_request
|
637
735
|
|
638
736
|
|
639
737
|
# Retrieve batch and other event level metric values
|
640
738
|
def get_stats
|
641
|
-
|
739
|
+
@stats_lock.synchronize do
|
740
|
+
current_stats = @multi_receive_statistics.clone
|
642
741
|
|
643
|
-
|
644
|
-
|
645
|
-
|
742
|
+
current_stats[:multi_receive_duration_p50] = @plugin_metrics[:multi_receive_duration_secs].query(0.5)
|
743
|
+
current_stats[:multi_receive_duration_p90] = @plugin_metrics[:multi_receive_duration_secs].query(0.9)
|
744
|
+
current_stats[:multi_receive_duration_p99] = @plugin_metrics[:multi_receive_duration_secs].query(0.99)
|
646
745
|
|
647
|
-
|
648
|
-
|
649
|
-
|
746
|
+
current_stats[:multi_receive_event_count_p50] = @plugin_metrics[:multi_receive_event_count].query(0.5)
|
747
|
+
current_stats[:multi_receive_event_count_p90] = @plugin_metrics[:multi_receive_event_count].query(0.9)
|
748
|
+
current_stats[:multi_receive_event_count_p99] = @plugin_metrics[:multi_receive_event_count].query(0.99)
|
650
749
|
|
651
|
-
|
652
|
-
|
653
|
-
|
750
|
+
current_stats[:event_attributes_count_p50] = @plugin_metrics[:event_attributes_count].query(0.5)
|
751
|
+
current_stats[:event_attributes_count_p90] = @plugin_metrics[:event_attributes_count].query(0.9)
|
752
|
+
current_stats[:event_attributes_count_p99] = @plugin_metrics[:event_attributes_count].query(0.99)
|
654
753
|
|
655
|
-
|
656
|
-
|
657
|
-
current_stats[:
|
658
|
-
current_stats[:flatten_values_duration_secs_p90] = @plugin_metrics[:flatten_values_duration_secs].query(0.9)
|
659
|
-
current_stats[:flatten_values_duration_secs_p99] = @plugin_metrics[:flatten_values_duration_secs].query(0.99)
|
660
|
-
end
|
754
|
+
current_stats[:batches_per_multi_receive_p50] = @plugin_metrics[:batches_per_multi_receive].query(0.5)
|
755
|
+
current_stats[:batches_per_multi_receive_p90] = @plugin_metrics[:batches_per_multi_receive].query(0.9)
|
756
|
+
current_stats[:batches_per_multi_receive_p99] = @plugin_metrics[:batches_per_multi_receive].query(0.99)
|
661
757
|
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
758
|
+
if @flatten_nested_values
|
759
|
+
# We only return those metrics in case flattening is enabled
|
760
|
+
current_stats[:flatten_values_duration_secs_p50] = @plugin_metrics[:flatten_values_duration_secs].query(0.5)
|
761
|
+
current_stats[:flatten_values_duration_secs_p90] = @plugin_metrics[:flatten_values_duration_secs].query(0.9)
|
762
|
+
current_stats[:flatten_values_duration_secs_p99] = @plugin_metrics[:flatten_values_duration_secs].query(0.99)
|
763
|
+
end
|
764
|
+
|
765
|
+
if @flush_quantile_estimates_on_status_send
|
766
|
+
@logger.debug "Recreating / reseting quantile estimator classes for plugin metrics"
|
767
|
+
@plugin_metrics = get_new_metrics
|
768
|
+
end
|
666
769
|
|
667
|
-
|
770
|
+
current_stats
|
771
|
+
end
|
668
772
|
end
|
669
773
|
|
670
774
|
|
@@ -683,37 +787,56 @@ class LogStash::Outputs::Scalyr < LogStash::Outputs::Base
|
|
683
787
|
'plugin_id' => self.id,
|
684
788
|
}
|
685
789
|
}
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
790
|
+
@send_stats.synchronize do
|
791
|
+
if !@last_status_transmit_time
|
792
|
+
status_event[:attrs]['message'] = sprintf("Started Scalyr LogStash output plugin (%s)." % [PLUGIN_VERSION])
|
793
|
+
status_event[:attrs]['serverHost'] = @node_hostname
|
794
|
+
else
|
795
|
+
cur_time = Time.now()
|
796
|
+
return if (cur_time.to_i - @last_status_transmit_time.to_i) < @status_report_interval
|
797
|
+
# echee TODO: get instance stats from session and create a status log line
|
798
|
+
msg = 'plugin_status: '
|
799
|
+
cnt = 0
|
800
|
+
@client_session.get_stats.each do |k, v|
|
801
|
+
val = v.instance_of?(Float) ? sprintf("%.4f", v) : v
|
802
|
+
val = val.nil? ? 0 : val
|
803
|
+
msg << ' ' if cnt > 0
|
804
|
+
msg << "#{k.to_s}=#{val}"
|
805
|
+
cnt += 1
|
806
|
+
end
|
807
|
+
get_stats.each do |k, v|
|
808
|
+
val = v.instance_of?(Float) ? sprintf("%.4f", v) : v
|
809
|
+
val = val.nil? ? 0 : val
|
810
|
+
msg << ' ' if cnt > 0
|
811
|
+
msg << "#{k.to_s}=#{val}"
|
812
|
+
cnt += 1
|
813
|
+
end
|
814
|
+
status_event[:attrs]['message'] = msg
|
815
|
+
status_event[:attrs]['serverHost'] = @node_hostname
|
816
|
+
status_event[:attrs]['parser'] = @status_parser
|
702
817
|
end
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
818
|
+
multi_event_request = create_multi_event_request([status_event], nil, nil, nil)
|
819
|
+
begin
|
820
|
+
@client_session.post_add_events(multi_event_request[:body], true, 0)
|
821
|
+
rescue => e
|
822
|
+
if e.body
|
823
|
+
@logger.warn(
|
824
|
+
"Unexpected error occurred while uploading status to Scalyr",
|
825
|
+
:error_message => e.message,
|
826
|
+
:error_class => e.class.name,
|
827
|
+
:body => Scalyr::Common::Util.truncate(e.body, 512)
|
828
|
+
)
|
829
|
+
else
|
830
|
+
@logger.warn(
|
831
|
+
"Unexpected error occurred while uploading status to Scalyr",
|
832
|
+
:error_message => e.message,
|
833
|
+
:error_class => e.class.name
|
834
|
+
)
|
835
|
+
end
|
836
|
+
return
|
709
837
|
end
|
710
|
-
|
711
|
-
status_event[:attrs]['serverHost'] = @node_hostname
|
712
|
-
status_event[:attrs]['parser'] = @status_parser
|
838
|
+
@last_status_transmit_time = Time.now()
|
713
839
|
end
|
714
|
-
multi_event_request = create_multi_event_request([status_event], nil, nil)
|
715
|
-
@client_session.post_add_events(multi_event_request[:body], true, 0)
|
716
|
-
@last_status_transmit_time = Time.now()
|
717
840
|
|
718
841
|
if @log_status_messages_to_stdout
|
719
842
|
@logger.info msg
|