fluent-plugin-bugsnag 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/circle.yml +3 -0
- data/fluent-plugin-bugsnag.gemspec +2 -2
- data/lib/fluent/plugin/out_bugsnag.rb +13 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 444faad7df2f658d3043b75a03ff5b596600d5b0
|
4
|
+
data.tar.gz: 51b7817997ed40886d83551f01e547f3332757b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c649c1756fe042794c338ffa2bb320a5ba0fad1cd149ade9b873c2056eda7fc7eadb64888ddda51c52e25d2f26fd8195dc5d81016b39ead7d5bf5de4f59b89
|
7
|
+
data.tar.gz: c1baedfd2a932eb74d6269a7014ec234f74e289adf147f9267c4158ad4f41e2a479a6e254ac92d0ed0ba01c661033f4e0046d9af12ed8e696a551a0556746315
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/fluent-plugin-bugsnag.svg)](http://badge.fury.io/rb/fluent-plugin-bugsnag)
|
2
|
-
![Build Status](https://circleci.com/gh/
|
2
|
+
![Build Status](https://circleci.com/gh/feedforce/fluent-plugin-bugsnag.svg?style=shield)
|
3
3
|
|
4
4
|
# Fluent::Plugin::Bugsnag
|
5
5
|
|
@@ -31,7 +31,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
31
31
|
|
32
32
|
## Contributing
|
33
33
|
|
34
|
-
1. Fork it ( https://github.com/
|
34
|
+
1. Fork it ( https://github.com/feedforce/fluent-plugin-bugsnag/fork )
|
35
35
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
36
36
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
37
37
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/circle.yml
ADDED
@@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-bugsnag"
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.2.0'
|
8
8
|
spec.authors = ["koshigoe"]
|
9
9
|
spec.email = ["koshigoeb@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = %q{Fluentd output plubin for Bugsnag.}
|
12
12
|
spec.description = %q{Fluentd output plubin for Bugsnag.}
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/feedforce/fluent-plugin-bugsnag"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -17,13 +17,14 @@ module Fluent
|
|
17
17
|
|
18
18
|
def write(chunk)
|
19
19
|
chunk.msgpack_each do |(tag,time,record)|
|
20
|
-
|
20
|
+
options = record['options'] || {}
|
21
|
+
request(record['url'], record['body'], options)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
|
-
def request(url, body)
|
27
|
+
def request(url, body, options = {})
|
27
28
|
uri = URI.parse(url)
|
28
29
|
http = Net::HTTP.new(uri.host, uri.port, @bugsnag_proxy_host, @bugsnag_proxy_port, @bugsnag_proxy_user, @bugsnag_proxy_password)
|
29
30
|
http.read_timeout = @bugsnag_timeout
|
@@ -36,7 +37,10 @@ module Fluent
|
|
36
37
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
37
38
|
end
|
38
39
|
|
39
|
-
|
40
|
+
headers = options.key?('headers') ? options['headers'] : {}
|
41
|
+
headers.merge!(default_headers)
|
42
|
+
|
43
|
+
request = Net::HTTP::Post.new(path(uri), headers)
|
40
44
|
request.body = body
|
41
45
|
http.request(request)
|
42
46
|
end
|
@@ -44,5 +48,11 @@ module Fluent
|
|
44
48
|
def path(uri)
|
45
49
|
uri.path == "" ? "/" : uri.path
|
46
50
|
end
|
51
|
+
|
52
|
+
def default_headers
|
53
|
+
{
|
54
|
+
"Content-Type" => "application/json",
|
55
|
+
}
|
56
|
+
end
|
47
57
|
end
|
48
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- koshigoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,10 +95,11 @@ files:
|
|
95
95
|
- Rakefile
|
96
96
|
- bin/console
|
97
97
|
- bin/setup
|
98
|
+
- circle.yml
|
98
99
|
- fluent-plugin-bugsnag.gemspec
|
99
100
|
- lib/fluent/plugin/out_bugsnag.rb
|
100
101
|
- td-agent.conf
|
101
|
-
homepage: https://github.com/
|
102
|
+
homepage: https://github.com/feedforce/fluent-plugin-bugsnag
|
102
103
|
licenses:
|
103
104
|
- MIT
|
104
105
|
metadata: {}
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
version: '0'
|
119
120
|
requirements: []
|
120
121
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.5.1
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
125
|
summary: Fluentd output plubin for Bugsnag.
|