logstash-codec-snowplow 0.4.pre.6.0.0.beta1 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/codecs/snowplow.rb +9 -6
- data/logstash-codec-snowplow.gemspec +3 -3
- metadata +14 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 735f80f0427aa930ac4d0a1222cdfb8466513011
|
4
|
+
data.tar.gz: a1d55fd670e17f55ca995a84fd5bc9d5207bbd66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a549cc5cfe8299dd82c637736fd3c5220946b2c480089881003395d33e200dd5ac1dc2543e6063d5b511d7b9f9a3a295ead519a9e36394ce755f0da4650bf7
|
7
|
+
data.tar.gz: c561c0b8d91ac8878616335b62a8ec0c6a316cff77a6edcaf2164e6709b79a1d4310d9bea30f3ec413c2714fa53f989e6e1a0adecf2a09efc67d3cee723c817f
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'json'
|
4
4
|
require 'logger'
|
5
5
|
require 'logstash/codecs/base'
|
6
|
+
require 'logstash/namespace'
|
6
7
|
|
7
8
|
# Read serialized Thrift Snowplow enriched-event records as Logstash events
|
8
9
|
#
|
@@ -182,10 +183,12 @@ class LogStash::Codecs::Snowplow < LogStash::Codecs::Base
|
|
182
183
|
|
183
184
|
public
|
184
185
|
def decode(data)
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
186
|
+
begin
|
187
|
+
values = data.to_s.split("\t")
|
188
|
+
hash = Hash[*ENRICHED_EVENT.zip(values).flatten] if values.length == ENRICHED_EVENT.length
|
189
|
+
yield LogStash::Event.new(hash)
|
190
|
+
rescue
|
191
|
+
@logger.error("Fail to decode: #{data.to_s}")
|
192
|
+
end
|
190
193
|
end
|
191
|
-
end
|
194
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-codec-snowplow'
|
3
|
-
s.version = '0.4
|
3
|
+
s.version = '0.4'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'This example input streams a string at a definable interval.'
|
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/plugin install gemname. This gem is not a stand-alone program'
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.metadata = {'logstash_plugin' => 'true', 'logstash_group' => 'codec'}
|
20
20
|
|
21
21
|
# Gem dependencies
|
22
|
-
s.add_runtime_dependency 'logstash-core-plugin-api', '
|
23
|
-
s.
|
22
|
+
s.add_runtime_dependency 'logstash-core-plugin-api', '~> 2.0'
|
23
|
+
s.add_runtime_dependency 'logstash-codec-line', '3.0.3'
|
24
24
|
s.add_development_dependency 'logstash-devutils'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,49 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-codec-snowplow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4
|
4
|
+
version: '0.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robson Júnior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
17
|
-
- !ruby/object:Gem::Version
|
18
|
-
version: '1.60'
|
19
|
-
- - "<="
|
16
|
+
- - "~>"
|
20
17
|
- !ruby/object:Gem::Version
|
21
|
-
version: '2.
|
18
|
+
version: '2.0'
|
22
19
|
name: logstash-core-plugin-api
|
23
20
|
prerelease: false
|
24
21
|
type: :runtime
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.60'
|
30
|
-
- - "<="
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: '2.
|
26
|
+
version: '2.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
|
-
- -
|
30
|
+
- - '='
|
37
31
|
- !ruby/object:Gem::Version
|
38
|
-
version: 3.3
|
39
|
-
name:
|
32
|
+
version: 3.0.3
|
33
|
+
name: logstash-codec-line
|
40
34
|
prerelease: false
|
41
|
-
type: :
|
35
|
+
type: :runtime
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- -
|
38
|
+
- - '='
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: 3.3
|
40
|
+
version: 3.0.3
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
requirement: !ruby/object:Gem::Requirement
|
49
43
|
requirements:
|
@@ -88,9 +82,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
82
|
version: '0'
|
89
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
84
|
requirements:
|
91
|
-
- - "
|
85
|
+
- - ">="
|
92
86
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
87
|
+
version: '0'
|
94
88
|
requirements: []
|
95
89
|
rubyforge_project:
|
96
90
|
rubygems_version: 2.6.8
|