fluent-plugin-snowplow 0.1.0 → 0.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: d23d33b47f60b11412c20e0bda62d82e9a79ab18
4
- data.tar.gz: b177a60cf444eee4e3380958cc933e2a32613418
3
+ metadata.gz: ff0db0fa4ef9c6a8421448aca46c32963cff1d26
4
+ data.tar.gz: 06c318670a4c1773e7a19929924b34d6ec6e830e
5
5
  SHA512:
6
- metadata.gz: 191533053367295fb18ab3c5a3447fcb33732d9e0fad7ea165e5a31932a5423cbfdd021a1dae1b306c4b38bfa12833d62316f57f507562281fc9a635ba629ec8
7
- data.tar.gz: a416ae37f6450d2e0c57864cd1f605afe4619a2e795e50fa588d6012101ae2be76a8a56cb21983591dc432841e714096e7b7f2369deb6701e0ad5476c7924b7a
6
+ metadata.gz: 2f91a7d2ad2c4d8908307bddb4ee1d0b74da11946df9134f5e66ec5b2ad1175427768b02a1cae8d4be900d4a0edf68ed25ee425453749286025101987a7da692
7
+ data.tar.gz: b8c9fb3529778b3d5560a2f0bcbb86e6a9e104a2745296e29498fe532c9f56601e3d6df51ae8704e9f59b0e028a2430201d7ed25123984a801c1e3d3f6b08852
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module Snowplow
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  require 'fluent/plugin/snowplow/version'
2
- require 'snowplow-tracker'
2
+ require 'fluent/plugin/out_snowplow'
3
3
 
4
4
  module Fluent
5
5
  module Plugin
@@ -7,58 +7,3 @@ module Fluent
7
7
  end
8
8
  end
9
9
  end
10
-
11
- class Fluent::SomeOutput < Fluent::TimeSlicedOutput
12
- Fluent::Plugin.register_output('snowplow', self)
13
-
14
- config_param :host, :string
15
- config_param :buffer_size, :integer
16
- config_param :protocol, :string
17
- config_param :method, :string
18
-
19
- def configure(conf)
20
- super
21
- end
22
-
23
- def start
24
- super
25
-
26
- @emitter = SnowplowTracker::Emitter.new(@host, {
27
- buffer_size: @buffer_size,
28
- protocol: @protocol,
29
- method: @method
30
- })
31
-
32
- @trackers = {}
33
- end
34
-
35
- def stop
36
- @tracker.flush
37
- end
38
-
39
- def format(tag, time, record)
40
- [tag, time, record].to_msgpack
41
- end
42
-
43
- def tracker_for(application)
44
- @trackers[application] ||= SnowplowTracker::Tracker.new(@emitter, nil, nil, application)
45
- @trackers[application]
46
- end
47
-
48
- def write(chunk)
49
- application, tracker = nil, nil
50
-
51
- chunk.msgpack_each do |_, _, record|
52
- schema = record['schema']
53
- message = JSON.parse record['message']
54
- true_timestamp = record['true_timestamp']
55
- application = record['application']
56
- tracker = tracker_for(application)
57
-
58
- self_describing_json = SnowplowTracker::SelfDescribingJson.new(schema, message)
59
- tracker.track_self_describing_event(self_describing_json, nil, SnowplowTracker::TrueTimestamp.new(true_timestamp.to_i))
60
- end
61
-
62
- tracker.flush
63
- end
64
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-snowplow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Souza