logstash-output-http 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0f8641077417db2ff06a2c110b1bd0db08ade0e
4
- data.tar.gz: 1c0e81c71ec5058b354b76e8d6e895b0752c7f46
3
+ metadata.gz: f7bdce3a5a4b518dd65c7a99db5f3442540aa112
4
+ data.tar.gz: f5c6894d57ec7606344c6a74937a6d33da4420c7
5
5
  SHA512:
6
- metadata.gz: f6fa16c1088eebbcf31f6570c889d5a99bea037cd80c1ee6e74d1b7aa3caca10d1441f6bcbc83ed6f857b1802f8220bed77964f7b47fbe7f75fa75610a36c3e7
7
- data.tar.gz: 9565bfee79b50fb814ffbdd0ea735533070994d026033896f76b62ee5c1ccbf4fcab278a4b38cbd10dfcd94b1b3bc90137001ffb1f29d8cf3cebeef805dd66b4
6
+ metadata.gz: 4fbf0c5ea31c2fd8fa994f19f1a695ede4bd7eaa8ebd9ff098127ada67f929c99b06946200860ffaee04c55e8f3103ead44544b3c95fcd32587be7d01b306da3
7
+ data.tar.gz: bf4f3a9dd411f36211e55509a8400b3b538574b341d5e954c2ff451c93da171ce369eea756e1a0e9ad825b2badfb9d664bdbc518e78509f908d6fdde74944089
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- * 1.1.0
1
+ ## 1.1.1
2
+ - fixed memory leak
3
+ - fixed potential race condition on async callbacks
4
+
5
+ ## 1.1.0
2
6
  - Concurrent execution
3
7
  - Add many HTTP options via the http_client mixin
4
8
  - Switch to manticore as HTTP Client
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Logstash Plugin
2
2
 
3
- This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
3
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
4
 
5
5
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
6
6
 
7
7
  ## Documentation
8
8
 
9
- Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elasticsearch.org/guide/en/logstash/current/).
9
+ Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
10
10
 
11
11
  - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
12
- - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
12
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
13
13
 
14
14
  ## Need Help?
15
15
 
@@ -83,4 +83,4 @@ Programming is not a required skill. Whatever you've seen about open source and
83
83
 
84
84
  It is more important to the community that you are able to contribute.
85
85
 
86
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elasticsearch/logstash/blob/master/CONTRIBUTING.md) file.
86
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -89,6 +89,8 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
89
89
  validate_format!
90
90
  end # def register
91
91
 
92
+ # TODO: (colin) the request call sequence + async handling will have to be reworked when using
93
+ # Maticore >= 5.0. I will set a version constrain in the gemspec for this.
92
94
  def receive(event)
93
95
  return unless output?(event)
94
96
 
@@ -102,13 +104,17 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
102
104
  headers = event_headers(event)
103
105
 
104
106
  # Create an async request
105
- request = client.send(@http_method, url, body: body, headers: headers, async: true)
107
+ request = client.send(@http_method, url, :body => body, :headers => headers, :async => true)
106
108
 
107
- # Invoke it using the Manticore Executor (CachedThreadPool) directly
108
- request_async_background(request)
109
+ # with Maticore version < 0.5 using :async => true places the requests in an @async_requests
110
+ # list which is used & cleaned by Client#execute! but we are not using it here and we must
111
+ # purge it manually to avoid leaking requests.
112
+ client.clear_pending
113
+
114
+ # attach handlers before performing request
109
115
 
110
- # Make sure we return the token to the pool
111
116
  request.on_complete do
117
+ # Make sure we return the token to the pool
112
118
  @request_tokens << token
113
119
  end
114
120
 
@@ -133,6 +139,9 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
133
139
  :backtrace => exception.backtrace
134
140
  )
135
141
  end
142
+
143
+ # Invoke it using the Manticore Executor (CachedThreadPool) directly
144
+ request_async_background(request)
136
145
  end
137
146
 
138
147
  private
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-http'
4
- s.version = '1.1.0'
4
+ s.version = '1.1.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This output lets you `PUT` or `POST` events to a generic HTTP(S) endpoint"
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -23,6 +23,10 @@ Gem::Specification.new do |s|
23
23
  s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
24
24
  s.add_runtime_dependency 'logstash-mixin-http_client', '>= 1.0.1', '< 2.0.0'
25
25
 
26
+ # Constrain Maticore dependency to less than 0.5.0 because of changes in the async handling
27
+ # see note in http.rb
28
+ s.add_runtime_dependency "manticore", "< 0.5.0"
29
+
26
30
  s.add_development_dependency 'logstash-devutils'
27
31
  s.add_development_dependency 'logstash-codec-plain'
28
32
  s.add_development_dependency 'sinatra'
metadata CHANGED
@@ -1,17 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - '>='
17
+ - !ruby/object:Gem::Version
18
+ version: 1.4.0
19
+ - - <
20
+ - !ruby/object:Gem::Version
21
+ version: 2.0.0
14
22
  name: logstash-core
23
+ prerelease: false
24
+ type: :runtime
15
25
  version_requirements: !ruby/object:Gem::Requirement
16
26
  requirements:
17
27
  - - '>='
@@ -20,18 +30,18 @@ dependencies:
20
30
  - - <
21
31
  - !ruby/object:Gem::Version
22
32
  version: 2.0.0
33
+ - !ruby/object:Gem::Dependency
23
34
  requirement: !ruby/object:Gem::Requirement
24
35
  requirements:
25
36
  - - '>='
26
37
  - !ruby/object:Gem::Version
27
- version: 1.4.0
38
+ version: 1.0.1
28
39
  - - <
29
40
  - !ruby/object:Gem::Version
30
41
  version: 2.0.0
42
+ name: logstash-mixin-http_client
31
43
  prerelease: false
32
44
  type: :runtime
33
- - !ruby/object:Gem::Dependency
34
- name: logstash-mixin-http_client
35
45
  version_requirements: !ruby/object:Gem::Requirement
36
46
  requirements:
37
47
  - - '>='
@@ -40,72 +50,76 @@ dependencies:
40
50
  - - <
41
51
  - !ruby/object:Gem::Version
42
52
  version: 2.0.0
53
+ - !ruby/object:Gem::Dependency
43
54
  requirement: !ruby/object:Gem::Requirement
44
55
  requirements:
45
- - - '>='
46
- - !ruby/object:Gem::Version
47
- version: 1.0.1
48
56
  - - <
49
57
  - !ruby/object:Gem::Version
50
- version: 2.0.0
58
+ version: 0.5.0
59
+ name: manticore
51
60
  prerelease: false
52
61
  type: :runtime
53
- - !ruby/object:Gem::Dependency
54
- name: logstash-devutils
55
62
  version_requirements: !ruby/object:Gem::Requirement
56
63
  requirements:
57
- - - '>='
64
+ - - <
58
65
  - !ruby/object:Gem::Version
59
- version: '0'
66
+ version: 0.5.0
67
+ - !ruby/object:Gem::Dependency
60
68
  requirement: !ruby/object:Gem::Requirement
61
69
  requirements:
62
70
  - - '>='
63
71
  - !ruby/object:Gem::Version
64
72
  version: '0'
73
+ name: logstash-devutils
65
74
  prerelease: false
66
75
  type: :development
67
- - !ruby/object:Gem::Dependency
68
- name: logstash-codec-plain
69
76
  version_requirements: !ruby/object:Gem::Requirement
70
77
  requirements:
71
78
  - - '>='
72
79
  - !ruby/object:Gem::Version
73
80
  version: '0'
81
+ - !ruby/object:Gem::Dependency
74
82
  requirement: !ruby/object:Gem::Requirement
75
83
  requirements:
76
84
  - - '>='
77
85
  - !ruby/object:Gem::Version
78
86
  version: '0'
87
+ name: logstash-codec-plain
79
88
  prerelease: false
80
89
  type: :development
81
- - !ruby/object:Gem::Dependency
82
- name: sinatra
83
90
  version_requirements: !ruby/object:Gem::Requirement
84
91
  requirements:
85
92
  - - '>='
86
93
  - !ruby/object:Gem::Version
87
94
  version: '0'
95
+ - !ruby/object:Gem::Dependency
88
96
  requirement: !ruby/object:Gem::Requirement
89
97
  requirements:
90
98
  - - '>='
91
99
  - !ruby/object:Gem::Version
92
100
  version: '0'
101
+ name: sinatra
93
102
  prerelease: false
94
103
  type: :development
95
- - !ruby/object:Gem::Dependency
96
- name: webrick
97
104
  version_requirements: !ruby/object:Gem::Requirement
98
105
  requirements:
99
106
  - - '>='
100
107
  - !ruby/object:Gem::Version
101
108
  version: '0'
109
+ - !ruby/object:Gem::Dependency
102
110
  requirement: !ruby/object:Gem::Requirement
103
111
  requirements:
104
112
  - - '>='
105
113
  - !ruby/object:Gem::Version
106
114
  version: '0'
115
+ name: webrick
107
116
  prerelease: false
108
117
  type: :development
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
109
123
  description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
110
124
  email: info@elastic.co
111
125
  executables: []
@@ -145,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
159
  version: '0'
146
160
  requirements: []
147
161
  rubyforge_project:
148
- rubygems_version: 2.1.9
162
+ rubygems_version: 2.4.8
149
163
  signing_key:
150
164
  specification_version: 4
151
165
  summary: This output lets you `PUT` or `POST` events to a generic HTTP(S) endpoint