honeycomb-rails 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/honeycomb-rails/railtie.rb +14 -21
- data/lib/honeycomb-rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 017fdc196902aa439d9db39265aa6184ca8c13c40bb79bcb770c29d7f8621ab1
|
4
|
+
data.tar.gz: 575023c210eade7f3f1dd18ba720937f82e055b72c9c7d556879acdf84807bd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d630a38edf0578e6cd0eccdcaaf82a3347225f477c1bb239c2b67a796f32b21dd6eba172870fae4216cb344f4d8c95092c5d6e1552ea8c885b2fbcb2189aaa5
|
7
|
+
data.tar.gz: 36d6080273a54706b3e57cd61b1231418ecd45b082134a4bf9c103697abba09f02a485ca33966d3eddcac6b96e5a6f7fbc7ab0f3cacc3e953935a45fd2237f0c
|
@@ -21,37 +21,30 @@ module HoneycombRails
|
|
21
21
|
|
22
22
|
@libhoney = HoneycombRails.config.client || begin
|
23
23
|
writekey = HoneycombRails.config.writekey
|
24
|
-
|
25
|
-
|
24
|
+
default_dataset = HoneycombRails.config.dataset
|
25
|
+
if writekey.blank? || default_dataset.blank?
|
26
|
+
missing = writekey.blank? ? 'writekey' : 'dataset'
|
27
|
+
warn "No #{missing} defined! (Check your config's `#{missing}` value in config/initializers/honeycomb.rb) No events will be sent to Honeycomb."
|
28
|
+
Libhoney::NullClient.new
|
29
|
+
else
|
30
|
+
Libhoney::Client.new(
|
31
|
+
writekey: writekey,
|
32
|
+
dataset: default_dataset,
|
33
|
+
user_agent_addition: HoneycombRails::USER_AGENT_SUFFIX,
|
34
|
+
)
|
26
35
|
end
|
27
|
-
|
28
|
-
Libhoney::Client.new(
|
29
|
-
writekey: writekey,
|
30
|
-
user_agent_addition: HoneycombRails::USER_AGENT_SUFFIX,
|
31
|
-
)
|
32
36
|
end
|
33
37
|
end
|
34
38
|
|
35
39
|
config.after_initialize do
|
36
|
-
|
37
|
-
|
38
|
-
if !HoneycombRails.config.dataset.blank?
|
39
|
-
req_builder = @libhoney.builder
|
40
|
-
req_builder.dataset = HoneycombRails.config.dataset
|
41
|
-
subscribers.push(Subscribers::ProcessAction.new(req_builder))
|
42
|
-
end
|
40
|
+
req_builder = @libhoney.builder
|
41
|
+
Subscribers::ProcessAction.new(req_builder).subscribe!
|
43
42
|
|
44
43
|
if !HoneycombRails.config.db_dataset.blank?
|
45
44
|
db_builder = @libhoney.builder
|
46
45
|
db_builder.dataset = HoneycombRails.config.db_dataset
|
47
|
-
|
46
|
+
Subscribers::ActiveRecord.new(db_builder).subscribe!
|
48
47
|
end
|
49
|
-
|
50
|
-
if subscribers.empty?
|
51
|
-
HoneycombRails.config.logger.warn("No subscribers defined (are both HoneycombRails.config.dataset and HoneycombRails.config.db_dataset both blank?)")
|
52
|
-
end
|
53
|
-
|
54
|
-
subscribers.each(&:subscribe!)
|
55
48
|
end
|
56
49
|
end
|
57
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeycomb-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stokes
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-05
|
12
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: libhoney
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
20
|
+
version: 1.8.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.
|
27
|
+
version: 1.8.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rails
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|