Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash HTTP Device #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hle-skillz
Copy link

@hle-skillz hle-skillz commented Aug 18, 2020

Fixes #135.

Rudimentary HTTP Device that relies on buffering (inherits Connectable) rather than persistent HTTP connections (no-op connect) for efficiency.

Existing framework code inconveniently deleted uri and type options:

if parsed_uri_opts = parse_uri_config(opts)
opts.delete(:uri)
opts.merge!(parsed_uri_opts)
end
type = opts.delete(:type) || DEFAULT_TYPE

so I had to use parameter name url to allow simple configuration relying on Net::HTTP to auto-detect SSL, otherwise this could've been a one-liner setup:

LogStashLogger.new uri: 'https://logstash.example.com'

@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2020

Codecov Report

Merging #163 into master will decrease coverage by 0.13%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #163      +/-   ##
==========================================
- Coverage   92.68%   92.54%   -0.14%     
==========================================
  Files          64       66       +2     
  Lines        1668     1691      +23     
==========================================
+ Hits         1546     1565      +19     
- Misses        122      126       +4     
Impacted Files Coverage Δ
lib/logstash-logger/device/http.rb 93.33% <93.33%> (ø)
lib/logstash-logger/device.rb 98.07% <100.00%> (+0.07%) ⬆️
spec/device/http_spec.rb 100.00% <100.00%> (ø)
lib/logstash-logger/device/kinesis.rb 88.88% <0.00%> (-5.56%) ⬇️
lib/logstash-logger/device/firehose.rb 88.88% <0.00%> (-5.56%) ⬇️
lib/logstash-logger/device/tcp.rb 94.11% <0.00%> (-1.97%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8f5403...243745f. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] HTTP Support
2 participants