logstash-output-thinkingdata 1.1.0 → 1.1.1
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/thinkingdata.rb +20 -3
- data/logstash-output-thinkingdata.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36f24c7196c243ee0ec3df9f446f98e60c48d860e6404d6e38897ba2841a99fb
|
4
|
+
data.tar.gz: 9b9fbb9076a958cda52e69775bf23fdfd947c6925ede50cdd86f6d8138f58a2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc68f4e54b11095e2226772967499e4097175a0d4647f32b02eda64b6f5ecfb29f15d7d6e500b6cf92f903e914bdb7880611f713882e7b4a34e7347432a3f19
|
7
|
+
data.tar.gz: d60a81599ec0cf34c697676a85ed6d249e5de8f8d3da74adf6afcdaa42bf01b7e6038d08d8de990478872c023db548df1bafacc243d7c9133e0b9a408cbcf056
|
data/CHANGELOG.md
CHANGED
@@ -42,7 +42,7 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
42
42
|
# 是否检测appid
|
43
43
|
config :appid_check, :validate => :boolean, :default => false
|
44
44
|
|
45
|
-
PLUGIN_VERSION = "1.1.
|
45
|
+
PLUGIN_VERSION = "1.1.1"
|
46
46
|
|
47
47
|
public
|
48
48
|
|
@@ -140,14 +140,15 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
140
140
|
public
|
141
141
|
|
142
142
|
def flush(events, final)
|
143
|
+
events = data_valid(events)
|
144
|
+
data = events.to_json
|
143
145
|
if @compress == 0
|
144
|
-
data = events.to_json
|
145
146
|
compress_type = 'none'
|
146
147
|
else
|
147
148
|
gz = StringIO.new("w")
|
148
149
|
gz.set_encoding("BINARY")
|
149
150
|
z = Zlib::GzipWriter.new(gz)
|
150
|
-
z.write(
|
151
|
+
z.write(data)
|
151
152
|
z.close
|
152
153
|
data = gz.string
|
153
154
|
compress_type = 'gzip'
|
@@ -233,6 +234,22 @@ class LogStash::Outputs::Thinkingdata < LogStash::Outputs::Base
|
|
233
234
|
result
|
234
235
|
end
|
235
236
|
|
237
|
+
private
|
238
|
+
|
239
|
+
def data_valid(events)
|
240
|
+
result = []
|
241
|
+
events.each do |event|
|
242
|
+
begin
|
243
|
+
event.to_json
|
244
|
+
result << event
|
245
|
+
rescue => e
|
246
|
+
@logger.error("Could not parse events", :content => event.to_s, :Exception => e)
|
247
|
+
@parse_error_count += 1
|
248
|
+
end
|
249
|
+
end
|
250
|
+
return result
|
251
|
+
end
|
252
|
+
|
236
253
|
end
|
237
254
|
|
238
255
|
# class LogStash::Outputs::Thinkingdata
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-thinkingdata'
|
3
|
-
s.version = '1.1.
|
3
|
+
s.version = '1.1.1'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Output plugin for Thinkingdata Analytics'
|
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.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-thinkingdata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sdk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|