logstash-input-rabbitmq 5.2.2 → 5.2.3

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: 9717be7fd0104ed684844927a5a69a0fda982052
4
- data.tar.gz: 8b9d5fc15f6b107b73f8f9c5a94a446b7c443ea4
3
+ metadata.gz: 158655501a87fa5ca7beb4a9f5ef3819851a0d30
4
+ data.tar.gz: 05ed03e1cc8fdeae916bc6d5d2c6016236b7de37
5
5
  SHA512:
6
- metadata.gz: ced6c3f699db3b007d8bd0f374f62eba27dd0f6bf60ce3c9347a12f635c3b0213d9a6d54088618f1602b7785d39dddbb2dc3b9aebc9b986f1b2f5812460acf21
7
- data.tar.gz: 1234e882f423de759d0774fa8f232c3b88b5ebb3e16b7f9bb649b2408da0c12c02a163751aa870601a9fa23a55b916c7849fba46960ce1938e078fd19c0b8646
6
+ metadata.gz: f5af5e745f43667b28c668a8083b91c1b915f43929abd874f042fb88e8e1e223cb15c8f31ccd1502e77f367b9b8897494641a70ef3f4e9fbe53b973f26ba6f13
7
+ data.tar.gz: 19f8415dadf49ecc52db3827cfe2e55352979e20dba60bd6023f87a21d18a658d2c0901897cc7a06f9bea5032d18e3d1d31738d6f98dc6a84b3f85c1b519cbda
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 5.2.3
2
+ - Fix metadata decoration so that `add_field` and friends aren't overwritten by headers and properties
3
+
1
4
  ## 5.2.2
2
5
  - Remove legacy header normalization code. MarchHare does this directly now.
3
6
 
@@ -253,11 +253,8 @@ module LogStash
253
253
  @codec.decode(data) do |event|
254
254
  decorate(event)
255
255
  if @metadata_enabled
256
- meta = {
257
- "rabbitmq_headers" => get_headers(metadata),
258
- "rabbitmq_properties" => get_properties(metadata)
259
- }
260
- event.set("@metadata", meta)
256
+ event.set("[@metadata][rabbitmq_headers]", get_headers(metadata))
257
+ event.set("[@metadata][rabbitmq_properties]", get_properties(metadata))
261
258
  end
262
259
  @output_queue << event if event
263
260
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-rabbitmq'
3
- s.version = '5.2.2'
3
+ s.version = '5.2.3'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Pull events from a RabbitMQ exchange."
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -130,7 +130,7 @@ end
130
130
 
131
131
  describe "with a live server", :integration => true do
132
132
  let(:klass) { LogStash::Inputs::RabbitMQ }
133
- let(:config) { {"host" => "127.0.0.1", "auto_delete" => true, "codec" => "plain" } }
133
+ let(:config) { {"host" => "127.0.0.1", "auto_delete" => true, "codec" => "plain", "add_field" => {"[@metadata][foo]" => "bar"} } }
134
134
  let(:instance) { klass.new(config) }
135
135
  let(:hare_info) { instance.instance_variable_get(:@hare_info) }
136
136
  let(:output_queue) { Queue.new }
@@ -265,6 +265,10 @@ describe "with a live server", :integration => true do
265
265
  expect(event.get("@metadata")).to include("rabbitmq_headers")
266
266
  expect(event.get("[@metadata][rabbitmq_headers]")).to include(headers)
267
267
  end
268
+
269
+ it "should properly decorate the event" do
270
+ expect(event.get("[@metadata][foo]")).to eq("bar")
271
+ end
268
272
  end
269
273
  end
270
274
 
metadata CHANGED
@@ -1,17 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-17 00:00:00.000000000 Z
11
+ date: 2017-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- requirement: !ruby/object:Gem::Requirement
14
+ name: logstash-core-plugin-api
15
+ version_requirements: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - ">="
17
18
  - !ruby/object:Gem::Version
@@ -19,10 +20,7 @@ dependencies:
19
20
  - - "<="
20
21
  - !ruby/object:Gem::Version
21
22
  version: '2.99'
22
- name: logstash-core-plugin-api
23
- prerelease: false
24
- type: :runtime
25
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
@@ -30,8 +28,11 @@ dependencies:
30
28
  - - "<="
31
29
  - !ruby/object:Gem::Version
32
30
  version: '2.99'
31
+ prerelease: false
32
+ type: :runtime
33
33
  - !ruby/object:Gem::Dependency
34
- requirement: !ruby/object:Gem::Requirement
34
+ name: logstash-mixin-rabbitmq_connection
35
+ version_requirements: !ruby/object:Gem::Requirement
35
36
  requirements:
36
37
  - - ">="
37
38
  - !ruby/object:Gem::Version
@@ -39,10 +40,7 @@ dependencies:
39
40
  - - "<"
40
41
  - !ruby/object:Gem::Version
41
42
  version: 5.0.0
42
- name: logstash-mixin-rabbitmq_connection
43
- prerelease: false
44
- type: :runtime
45
- version_requirements: !ruby/object:Gem::Requirement
43
+ requirement: !ruby/object:Gem::Requirement
46
44
  requirements:
47
45
  - - ">="
48
46
  - !ruby/object:Gem::Version
@@ -50,48 +48,50 @@ dependencies:
50
48
  - - "<"
51
49
  - !ruby/object:Gem::Version
52
50
  version: 5.0.0
51
+ prerelease: false
52
+ type: :runtime
53
53
  - !ruby/object:Gem::Dependency
54
+ name: logstash-codec-json
55
+ version_requirements: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
54
60
  requirement: !ruby/object:Gem::Requirement
55
61
  requirements:
56
62
  - - ">="
57
63
  - !ruby/object:Gem::Version
58
64
  version: '0'
59
- name: logstash-codec-json
60
65
  prerelease: false
61
66
  type: :runtime
67
+ - !ruby/object:Gem::Dependency
68
+ name: logstash-devutils
62
69
  version_requirements: !ruby/object:Gem::Requirement
63
70
  requirements:
64
71
  - - ">="
65
72
  - !ruby/object:Gem::Version
66
73
  version: '0'
67
- - !ruby/object:Gem::Dependency
68
74
  requirement: !ruby/object:Gem::Requirement
69
75
  requirements:
70
76
  - - ">="
71
77
  - !ruby/object:Gem::Version
72
78
  version: '0'
73
- name: logstash-devutils
74
79
  prerelease: false
75
80
  type: :development
81
+ - !ruby/object:Gem::Dependency
82
+ name: logstash-codec-plain
76
83
  version_requirements: !ruby/object:Gem::Requirement
77
84
  requirements:
78
85
  - - ">="
79
86
  - !ruby/object:Gem::Version
80
87
  version: '0'
81
- - !ruby/object:Gem::Dependency
82
88
  requirement: !ruby/object:Gem::Requirement
83
89
  requirements:
84
90
  - - ">="
85
91
  - !ruby/object:Gem::Version
86
92
  version: '0'
87
- name: logstash-codec-plain
88
93
  prerelease: false
89
94
  type: :development
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
95
  description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
96
96
  email: info@elastic.co
97
97
  executables: []