logstash-output-newrelic 1.0.4 → 1.0.5.pre.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 486f17e1a3bc87e00990f487a0023139643b9309e1dab8c7845ec366169af7c5
4
- data.tar.gz: 1f19c28eac5cf94fb2a536869f81476b276d7c62bb99dbb9604596490ba0a643
3
+ metadata.gz: ab807cb889166e953912511aea7ed369826f33eb682a38132b92ce80dcc8ce53
4
+ data.tar.gz: 9f6a065d41735423e91a70de67098251d1f46d4f23595b683e4a191ff0b5d7df
5
5
  SHA512:
6
- metadata.gz: 86cda8ca9547298ed0ee085b3f81a61df641447d728dc27bb8e461c2fd18709baeea3fd3074589ce8415bfdfc5ca149452682468c4840468a42717e8e1b31d4f
7
- data.tar.gz: d6041b6024a4ceced2836fad93f1fae3339387fadec9c702742572bf69f0df12e8d77f4503e8865ef857f79aa373b1061f9edf9305f67d674de38ce12d86fe9b
6
+ metadata.gz: bc33bfc42f9ef925200fa214b9e37964dc62c4e5a7ed1e492f3bba5a25a7a5b09657683009f90b3e7a9a033d9769511bebdb0e1cda87357e57c0356e0a5e702b
7
+ data.tar.gz: 84f94a970f6371fd18c3f8344f6bb587bd56cdc7347beb83bacd006bb8b5fd8578fdbce4922d7e1249bdca657d997ca71ec5e2d9db1bb596da15e791e36a4600
@@ -52,10 +52,6 @@ class LogStash::Outputs::NewRelic < LogStash::Outputs::Base
52
52
  :attributes => {}
53
53
  }
54
54
 
55
- if event_hash.has_key?('message')
56
- log_message_hash[:attributes] = maybe_parse_json(event_hash['message'])
57
- end
58
-
59
55
  event_hash.each do |key, value|
60
56
  if key == 'message' || key == 'timestamp'
61
57
  # intrinsic attributes go at the top level
@@ -69,18 +65,6 @@ class LogStash::Outputs::NewRelic < LogStash::Outputs::Base
69
65
  log_message_hash
70
66
  end
71
67
 
72
- def maybe_parse_json(message)
73
- begin
74
- parsed = JSON.parse(message)
75
- if Hash === parsed
76
- return parsed
77
- end
78
- rescue JSON::ParserError
79
- # Not JSON
80
- end
81
- {}
82
- end
83
-
84
68
  def multi_receive(events)
85
69
  payload = []
86
70
  events.each do |event|
@@ -1,7 +1,7 @@
1
1
  module LogStash
2
2
  module Outputs
3
3
  module NewRelicVersion
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5-beta"
5
5
  end
6
6
  end
7
7
  end
@@ -120,7 +120,7 @@ describe LogStash::Outputs::NewRelic do
120
120
  .to have_been_made
121
121
  end
122
122
 
123
- it "JSON object 'message' field is parsed, removed, and its data merged as attributes" do
123
+ it "JSON object 'message' field is not parsed" do
124
124
  stub_request(:any, base_uri).to_return(status: 200)
125
125
 
126
126
  message_json = '{ "in-json-1": "1", "in-json-2": "2", "sub-object": {"in-json-3": "3"} }'
@@ -130,9 +130,7 @@ describe LogStash::Outputs::NewRelic do
130
130
  wait_for(a_request(:post, base_uri)
131
131
  .with { |request|
132
132
  message = single_gzipped_message(request.body)
133
- message['attributes']['in-json-1'] == '1' &&
134
- message['attributes']['in-json-2'] == '2' &&
135
- message['attributes']['sub-object'] == {"in-json-3" => "3"} &&
133
+ message['message'] == message_json &&
136
134
  message['attributes']['other'] == 'Other value' })
137
135
  .to have_been_made
138
136
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - New Relic Logging Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-19 00:00:00.000000000 Z
11
+ date: 2019-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -113,9 +113,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - ">="
116
+ - - ">"
117
117
  - !ruby/object:Gem::Version
118
- version: '0'
118
+ version: 1.3.1
119
119
  requirements: []
120
120
  rubyforge_project:
121
121
  rubygems_version: 2.7.6