stackify-ruby-apm 1.2.4 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -9
- data/lib/stackify_apm/config.rb +2 -1
- data/lib/stackify_apm/response_manipulator.rb +3 -8
- data/lib/stackify_apm/version.rb +1 -1
- data/lib/stackify_ruby_apm.rb +5 -2
- 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: e69ba17aa5e795974868a28d69a053d1e40a1991a9894d7b76e38fc147cdbc15
|
4
|
+
data.tar.gz: d556ea3ecff8621cb3024f33a82d396fa74a5582a5d86f34077cda9cf79ca60b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab0cc4910e4b1004e7d78074df65000a6d3c23d47f4b1cab36a5613418e9a4752c216bd0c1cfd2b476be6716eb877a36a1e3dc0e66b85d480f0f10f27994ab35
|
7
|
+
data.tar.gz: 199c9b05f7d9abbbddf4dce9aefd25b58edb61ee4aee28cd43ad88b225b5edc6b4e129f97dff2c7bfb3300b0bdb8330b1e3dd2202c611d49ef6d405f2693d7b7
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stackify-ruby-apm (1.
|
4
|
+
stackify-ruby-apm (1.3.0)
|
5
5
|
concurrent-ruby (~> 1.0)
|
6
6
|
delegate_matcher (~> 0.4)
|
7
7
|
rufus-scheduler (~> 3.5)
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
domain_name (0.5.20180417)
|
61
61
|
unf (>= 0.0.5, < 1.0.0)
|
62
62
|
erubis (2.7.0)
|
63
|
-
et-orbi (1.1
|
63
|
+
et-orbi (1.2.1)
|
64
64
|
tzinfo
|
65
65
|
fakeredis (0.7.0)
|
66
66
|
redis (>= 3.2, < 5.0)
|
@@ -68,8 +68,8 @@ GEM
|
|
68
68
|
multipart-post (>= 1.2, < 3)
|
69
69
|
file-tail (1.2.0)
|
70
70
|
tins (~> 1.0)
|
71
|
-
fugit (1.1
|
72
|
-
et-orbi (~> 1.1, >= 1.1.
|
71
|
+
fugit (1.2.1)
|
72
|
+
et-orbi (~> 1.1, >= 1.1.8)
|
73
73
|
raabro (~> 1.1)
|
74
74
|
globalid (0.4.2)
|
75
75
|
activesupport (>= 4.2.0)
|
@@ -163,16 +163,16 @@ GEM
|
|
163
163
|
ruby-progressbar (~> 1.7)
|
164
164
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
165
165
|
ruby-progressbar (1.10.0)
|
166
|
-
ruby2ruby (2.4.
|
166
|
+
ruby2ruby (2.4.2)
|
167
167
|
ruby_parser (~> 3.1)
|
168
168
|
sexp_processor (~> 4.6)
|
169
|
-
ruby_parser (3.
|
169
|
+
ruby_parser (3.13.1)
|
170
170
|
sexp_processor (~> 4.9)
|
171
|
-
rufus-scheduler (3.
|
172
|
-
fugit (~> 1.1, >= 1.1.
|
171
|
+
rufus-scheduler (3.6.0)
|
172
|
+
fugit (~> 1.1, >= 1.1.6)
|
173
173
|
safe_yaml (1.0.5)
|
174
174
|
sequel (5.18.0)
|
175
|
-
sexp_processor (4.
|
175
|
+
sexp_processor (4.12.0)
|
176
176
|
sinatra (1.4.8)
|
177
177
|
rack (~> 1.5)
|
178
178
|
rack-protection (~> 1.4)
|
data/lib/stackify_apm/config.rb
CHANGED
@@ -285,13 +285,14 @@ module StackifyRubyAPM
|
|
285
285
|
@client_run_domain = line.split('=')[1].strip
|
286
286
|
end
|
287
287
|
end
|
288
|
-
info "stackify.properties: clientId=#{@client_id}, deviceId=#{@device_id}"
|
288
|
+
info "stackify.properties: clientId=#{@client_id}, deviceId=#{@device_id}, client_rum_domain=#{@client_run_domain}"
|
289
289
|
rescue StandardError => e
|
290
290
|
info 'Error occured while reading the stackify.properties file.'
|
291
291
|
info e.inspect
|
292
292
|
end
|
293
293
|
info 'No clientId found from stackify.properties file.' if @client_id.nil?
|
294
294
|
info 'No deviceId found from stackify.properties file.' if @device_id.nil?
|
295
|
+
info 'No client RUM domain found from stackify.properties file.' if @client_run_domain.nil?
|
295
296
|
end
|
296
297
|
# rubocop:enable Metrics/CyclomaticComplexity
|
297
298
|
end
|
@@ -65,21 +65,16 @@ module StackifyRubyAPM
|
|
65
65
|
client_id = @config.client_id
|
66
66
|
device_id = @config.device_id
|
67
67
|
client_rundomain = @config.client_run_domain
|
68
|
-
transaction_id = defined?(StackifyRubyAPM.current_transaction.id) ? StackifyRubyAPM.current_transaction.id : nil
|
69
|
-
data_request_id = 'V2|' + transaction_id + '|C' + client_id + '|' + device_id
|
70
68
|
inject_flag = false
|
71
69
|
|
72
|
-
if client_rundomain != '' && StackifyRubyAPM.check_isdomain(client_rundomain)
|
70
|
+
if client_rundomain != '' && StackifyRubyAPM.check_isdomain(client_rundomain) && client_id && device_id
|
73
71
|
inject_flag = true
|
74
72
|
else
|
75
73
|
warn 'ClientRumDomain might be empty or Invalid URL stackify.properties.'
|
76
74
|
end
|
77
75
|
|
78
|
-
|
79
|
-
|
80
|
-
data-a="' + @config.application_name + '"
|
81
|
-
data-e="' + @config.environment_name + '"
|
82
|
-
data-enableInternalLogging="' + @config.debug_logging.to_s + '" type="text/javascript" async></script>'
|
76
|
+
return unless inject_flag
|
77
|
+
jsfile_to_inject = StackifyRubyAPM.inject_rum_script
|
83
78
|
|
84
79
|
# Only scan the first 50k (roughly) then give up.
|
85
80
|
beginning_of_source = source[0..SCAN_LIMIT]
|
data/lib/stackify_apm/version.rb
CHANGED
data/lib/stackify_ruby_apm.rb
CHANGED
@@ -40,22 +40,25 @@ module StackifyRubyAPM
|
|
40
40
|
Agent.start config
|
41
41
|
end
|
42
42
|
|
43
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
44
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
43
45
|
def self.inject_rum_script
|
44
46
|
config = StackifyRubyAPM::Config.new
|
45
47
|
client_id = config.client_id
|
46
48
|
device_id = config.device_id
|
47
49
|
client_rundomain = config.client_run_domain
|
48
50
|
transaction_id = defined?(StackifyRubyAPM.current_transaction.id) ? StackifyRubyAPM.current_transaction.id : nil
|
49
|
-
|
51
|
+
|
50
52
|
inject_flag = false
|
51
53
|
|
52
|
-
if client_rundomain != '' && check_isdomain(client_rundomain)
|
54
|
+
if client_rundomain != '' && check_isdomain(client_rundomain) && client_id && device_id
|
53
55
|
inject_flag = true
|
54
56
|
else
|
55
57
|
warn 'ClientRumDomain might be empty or Invalid URL stackify.properties.'
|
56
58
|
end
|
57
59
|
|
58
60
|
return unless inject_flag
|
61
|
+
data_request_id = 'V2|' + transaction_id + '|C' + client_id + '|CD' + device_id
|
59
62
|
@rum_script_injected = true
|
60
63
|
"<script src=\"#{config.rum_script_src}\" data-host=\"#{client_rundomain}\" data-requestId=\"#{data_request_id}\"
|
61
64
|
data-a=\"#{config.application_name}\" data-e=\"#{config.environment_name}\" data-enableInternalLogging=\"#{config.debug_logging}\" type=\"text/javascript\" async></script>"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackify-ruby-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stackify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|