appoptics_apm 4.8.3 → 4.8.4
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 +5 -5
- data/.travis.yml +10 -10
- data/Rakefile +7 -5
- data/lib/appoptics_apm/frameworks/rails/inst/action_controller.rb +3 -3
- data/lib/appoptics_apm/frameworks/rails/inst/action_controller6.rb +50 -0
- data/lib/appoptics_apm/frameworks/rails/inst/active_record.rb +2 -2
- data/lib/appoptics_apm/oboe_init_options.rb +5 -2
- data/lib/appoptics_apm/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 37478c40a16c8636f4589a15e63db8d1b2eb0eae
|
|
4
|
+
data.tar.gz: 2f2ac3b316e00963c42593680e638ecfc1792e3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f695fc74e9f23d799709c32faab13b8c8c56e2f7da34b6968a5f085daf964927d3c98ffcadc49be6ab181fb66a872a4ec97d121468f01ed205c449e0d0873abc
|
|
7
|
+
data.tar.gz: 730addb2cda57f6555d4965656cfeb1e753e32e7886e13cc1714c8b97b094664c4d0702a5494dc49ea7c266de6c101b25c4927a82ed652822890a581e45550b0
|
data/.travis.yml
CHANGED
|
@@ -11,7 +11,7 @@ env:
|
|
|
11
11
|
- DBTYPE=mysql
|
|
12
12
|
|
|
13
13
|
rvm:
|
|
14
|
-
- 2.6.
|
|
14
|
+
- 2.6.4
|
|
15
15
|
- 2.5.5
|
|
16
16
|
- 2.4.5
|
|
17
17
|
- ruby-head
|
|
@@ -23,6 +23,7 @@ gemfile:
|
|
|
23
23
|
- gemfiles/instrumentation_mocked.gemfile
|
|
24
24
|
- gemfiles/instrumentation_mocked_oldgems.gemfile
|
|
25
25
|
- gemfiles/frameworks.gemfile
|
|
26
|
+
- gemfiles/rails60.gemfile
|
|
26
27
|
- gemfiles/rails52.gemfile
|
|
27
28
|
- gemfiles/rails42.gemfile
|
|
28
29
|
- gemfiles/delayed_job.gemfile
|
|
@@ -32,11 +33,12 @@ matrix:
|
|
|
32
33
|
exclude:
|
|
33
34
|
- rvm: ruby-head
|
|
34
35
|
gemfile: gemfiles/rails42.gemfile
|
|
35
|
-
- rvm: 2.6.
|
|
36
|
+
- rvm: 2.6.4
|
|
36
37
|
gemfile: gemfiles/rails42.gemfile
|
|
38
|
+
- rvm: 2.4.5
|
|
39
|
+
gemfile: gemfiles/rails60.gemfile
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
- rmv: 2.6.3
|
|
41
|
+
- rmv: 2.6.4
|
|
40
42
|
env: DBTYPE=mysql
|
|
41
43
|
- rvm: 2.5.5
|
|
42
44
|
env: DBTYPE=mysql
|
|
@@ -57,10 +59,10 @@ matrix:
|
|
|
57
59
|
env: DBTYPE=mysql
|
|
58
60
|
- gemfile: gemfiles/frameworks.gemfile
|
|
59
61
|
env: DBTYPE=mysql
|
|
60
|
-
- gemfile: gemfiles/rails51.gemfile
|
|
61
|
-
env: DBTYPE=mysql
|
|
62
62
|
- gemfile: gemfiles/rails52.gemfile
|
|
63
63
|
env: DBTYPE=mysql
|
|
64
|
+
- gemfile: gemfiles/rails60.gemfile
|
|
65
|
+
env: DBTYPE=mysql
|
|
64
66
|
- gemfile: gemfiles/delayed_job.gemfile
|
|
65
67
|
env: DBTYPE=mysql
|
|
66
68
|
|
|
@@ -110,10 +112,8 @@ before_script:
|
|
|
110
112
|
- export APPOPTICS_TOKEN_BUCKET_CAPACITY=1000
|
|
111
113
|
- export APPOPTICS_TOKEN_BUCKET_RATE=1000
|
|
112
114
|
- export OBOE_VERSION=5.1.1
|
|
113
|
-
- bundle
|
|
114
|
-
- bundle exec rake
|
|
115
|
-
- bundle exec rake clean
|
|
116
|
-
- bundle exec rake compile
|
|
115
|
+
- bundle --jobs=3 --retry=3
|
|
116
|
+
- bundle exec rake clean fetch compile
|
|
117
117
|
- psql -c 'create database travis_ci_test;' -U postgres
|
|
118
118
|
- mysql -e 'create database travis_ci_test;'
|
|
119
119
|
- redis-server --requirepass secret_pass &
|
data/Rakefile
CHANGED
|
@@ -66,13 +66,13 @@ end
|
|
|
66
66
|
desc "Run all test suites defined by travis"
|
|
67
67
|
task "docker_tests" do
|
|
68
68
|
Dir.chdir('test/run_tests')
|
|
69
|
-
exec('docker-compose run ruby_appoptics /code/ruby-appoptics/test/run_tests/ruby_setup.sh test --remove-orphans')
|
|
69
|
+
exec('docker-compose run --rm ruby_appoptics /code/ruby-appoptics/test/run_tests/ruby_setup.sh test --remove-orphans')
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
desc "Start docker container for testing and debugging"
|
|
73
73
|
task "docker" do
|
|
74
74
|
Dir.chdir('test/run_tests')
|
|
75
|
-
exec('docker-compose run ruby_appoptics /code/ruby-appoptics/test/run_tests/ruby_setup.sh bash --remove-orphans')
|
|
75
|
+
exec('docker-compose run --rm ruby_appoptics /code/ruby-appoptics/test/run_tests/ruby_setup.sh bash --remove-orphans')
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
desc "Stop all containers that were started for testing and debugging"
|
|
@@ -84,11 +84,11 @@ end
|
|
|
84
84
|
desc "Fetch extension dependency files"
|
|
85
85
|
task :fetch_ext_deps do
|
|
86
86
|
swig_version = %x{swig -version} rescue ''
|
|
87
|
-
swig_version = swig_version.scan(/swig version
|
|
87
|
+
swig_version = swig_version.scan(/swig version [34]/i)
|
|
88
88
|
if swig_version.empty?
|
|
89
89
|
$stderr.puts '== ERROR ================================================================='
|
|
90
|
-
$stderr.puts "Could not find required swig version 3.0
|
|
91
|
-
$stderr.puts 'Please install swig "
|
|
90
|
+
$stderr.puts "Could not find required swig version >= 3.0.8, found #{swig_version.inspect}"
|
|
91
|
+
$stderr.puts 'Please install swig ">= 3.0.8" and try again.'
|
|
92
92
|
$stderr.puts '=========================================================================='
|
|
93
93
|
raise
|
|
94
94
|
end
|
|
@@ -128,6 +128,8 @@ task :fetch_ext_deps do
|
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
+
task :fetch => :fetch_ext_deps
|
|
132
|
+
|
|
131
133
|
desc "Build the gem's c extension"
|
|
132
134
|
task :compile do
|
|
133
135
|
if !defined?(JRUBY_VERSION)
|
|
@@ -84,10 +84,10 @@ module AppOpticsAPM
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
# ActionController::Base
|
|
87
|
-
if defined?(ActionController::Base) && AppOpticsAPM::Config[:action_controller][:enabled] && Rails::VERSION::MAJOR
|
|
87
|
+
if defined?(ActionController::Base) && AppOpticsAPM::Config[:action_controller][:enabled] && Rails::VERSION::MAJOR <= 6
|
|
88
88
|
AppOpticsAPM.logger.info '[appoptics_apm/loading] Instrumenting actioncontroller' if AppOpticsAPM::Config[:verbose]
|
|
89
89
|
require "appoptics_apm/frameworks/rails/inst/action_controller#{Rails::VERSION::MAJOR}"
|
|
90
|
-
if Rails::VERSION::MAJOR
|
|
90
|
+
if Rails::VERSION::MAJOR >= 5
|
|
91
91
|
ActionController::Base.send(:prepend, ::AppOpticsAPM::Inst::ActionController)
|
|
92
92
|
elsif Rails::VERSION::MAJOR < 5
|
|
93
93
|
AppOpticsAPM::Util.send_include(::ActionController::Base, AppOpticsAPM::Inst::ActionController)
|
|
@@ -95,7 +95,7 @@ if defined?(ActionController::Base) && AppOpticsAPM::Config[:action_controller][
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# ActionController::API - Rails 5 or via the rails-api gem
|
|
98
|
-
if defined?(ActionController::API) && AppOpticsAPM::Config[:action_controller_api][:enabled] && Rails::VERSION::MAJOR
|
|
98
|
+
if defined?(ActionController::API) && AppOpticsAPM::Config[:action_controller_api][:enabled] && Rails::VERSION::MAJOR <= 6
|
|
99
99
|
AppOpticsAPM.logger.info '[appoptics_apm/loading] Instrumenting actioncontroller api' if AppOpticsAPM::Config[:verbose]
|
|
100
100
|
require "appoptics_apm/frameworks/rails/inst/action_controller_api"
|
|
101
101
|
ActionController::API.send(:prepend, ::AppOpticsAPM::Inst::ActionControllerAPI)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright (c) 2016 SolarWinds, LLC.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
module AppOpticsAPM
|
|
5
|
+
module Inst
|
|
6
|
+
#
|
|
7
|
+
# ActionController
|
|
8
|
+
#
|
|
9
|
+
# This modules contains the instrumentation code specific
|
|
10
|
+
# to Rails v6
|
|
11
|
+
#
|
|
12
|
+
module ActionController
|
|
13
|
+
include AppOpticsAPM::Inst::RailsBase
|
|
14
|
+
|
|
15
|
+
def process_action(method_name, *args)
|
|
16
|
+
kvs = {
|
|
17
|
+
:Controller => self.class.name,
|
|
18
|
+
:Action => self.action_name,
|
|
19
|
+
}
|
|
20
|
+
request.env['appoptics_apm.controller'] = kvs[:Controller]
|
|
21
|
+
request.env['appoptics_apm.action'] = kvs[:Action]
|
|
22
|
+
|
|
23
|
+
return super(method_name, *args) unless AppOpticsAPM.tracing?
|
|
24
|
+
begin
|
|
25
|
+
kvs[:Backtrace] = AppOpticsAPM::API.backtrace if AppOpticsAPM::Config[:action_controller][:collect_backtraces]
|
|
26
|
+
|
|
27
|
+
AppOpticsAPM::API.log_entry('rails', kvs)
|
|
28
|
+
super(method_name, *args)
|
|
29
|
+
|
|
30
|
+
rescue Exception => e
|
|
31
|
+
AppOpticsAPM::API.log_exception('rails', e) if log_rails_error?(e)
|
|
32
|
+
raise
|
|
33
|
+
ensure
|
|
34
|
+
AppOpticsAPM::API.log_exit('rails')
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
#
|
|
39
|
+
# render
|
|
40
|
+
#
|
|
41
|
+
# Our render wrapper that calls 'trace', which will log if we are tracing
|
|
42
|
+
#
|
|
43
|
+
def render(*args, &blk)
|
|
44
|
+
trace('actionview') do
|
|
45
|
+
super(*args, &blk)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -5,13 +5,13 @@ require 'appoptics_apm/frameworks/rails/inst/connection_adapters/mysql'
|
|
|
5
5
|
require 'appoptics_apm/frameworks/rails/inst/connection_adapters/mysql2'
|
|
6
6
|
require 'appoptics_apm/frameworks/rails/inst/connection_adapters/postgresql'
|
|
7
7
|
|
|
8
|
-
if AppOpticsAPM::Config[:active_record][:enabled] && !defined?(JRUBY_VERSION) && Rails::VERSION::MAJOR
|
|
8
|
+
if AppOpticsAPM::Config[:active_record][:enabled] && !defined?(JRUBY_VERSION) && Rails::VERSION::MAJOR <= 6
|
|
9
9
|
begin
|
|
10
10
|
adapter = ActiveRecord::Base.connection_config[:adapter]
|
|
11
11
|
|
|
12
12
|
if Rails::VERSION::MAJOR < 5
|
|
13
13
|
require 'appoptics_apm/frameworks/rails/inst/connection_adapters/utils'
|
|
14
|
-
elsif Rails::VERSION::MAJOR
|
|
14
|
+
elsif Rails::VERSION::MAJOR >= 5
|
|
15
15
|
require 'appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x'
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -108,7 +108,8 @@ module AppOpticsAPM
|
|
|
108
108
|
|
|
109
109
|
reporter = ENV['APPOPTICS_REPORTER'] || 'ssl'
|
|
110
110
|
# override with 'file', e.g. when running tests
|
|
111
|
-
reporter
|
|
111
|
+
# changed my mind => set the right reporter in the env when running tests !!!
|
|
112
|
+
# reporter = 'file' if ENV.key?('APPOPTICS_GEM_TEST')
|
|
112
113
|
|
|
113
114
|
host = ''
|
|
114
115
|
case reporter
|
|
@@ -121,6 +122,7 @@ module AppOpticsAPM
|
|
|
121
122
|
# ____ AppOpticsAPM::Config[:reporter_host] and
|
|
122
123
|
# ____ AppOpticsAPM::Config[:reporter_port] were moved here from
|
|
123
124
|
# ____ oboe_metal.rb and are not documented anywhere
|
|
125
|
+
# ____ udp is for internal use only
|
|
124
126
|
when 'null'
|
|
125
127
|
host = ''
|
|
126
128
|
end
|
|
@@ -148,7 +150,7 @@ module AppOpticsAPM
|
|
|
148
150
|
end
|
|
149
151
|
|
|
150
152
|
def validate_token(token)
|
|
151
|
-
if (token !~ /^[0-9a-fA-F]{64}|[0-9a-zA-Z_\-]{71}$/)
|
|
153
|
+
if (token !~ /^[0-9a-fA-F]{64}|[0-9a-zA-Z_\-]{71}$/) && ENV['APPOPTICS_COLLECTOR'] != "sslcollector:12222"
|
|
152
154
|
masked = "#{token[0..3]}...#{token[-4..-1]}"
|
|
153
155
|
AppOpticsAPM.logger.error "[appoptics_apm/oboe_options] APPOPTICS_SERVICE_KEY problem. API Token in wrong format. Masked token: #{masked}"
|
|
154
156
|
return false
|
|
@@ -158,6 +160,7 @@ module AppOpticsAPM
|
|
|
158
160
|
end
|
|
159
161
|
|
|
160
162
|
def validate_transform_service_name(service_name)
|
|
163
|
+
service_name = 'test_ssl_collector' if ENV['APPOPTICS_COLLECTOR'] == "sslcollector:12222"
|
|
161
164
|
if service_name.empty?
|
|
162
165
|
AppOpticsAPM.logger.error "[appoptics_apm/oboe_options] APPOPTICS_SERVICE_KEY problem. Service Name is missing"
|
|
163
166
|
return false
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appoptics_apm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.8.
|
|
4
|
+
version: 4.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maia Engeli
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: json
|
|
@@ -30,20 +30,20 @@ dependencies:
|
|
|
30
30
|
name: no_proxy_fix
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
|
-
- - "
|
|
33
|
+
- - "~>"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
35
|
version: 0.1.2
|
|
36
|
-
- - "
|
|
36
|
+
- - ">="
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
38
|
version: 0.1.2
|
|
39
39
|
type: :runtime
|
|
40
40
|
prerelease: false
|
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
42
42
|
requirements:
|
|
43
|
-
- - "
|
|
43
|
+
- - "~>"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: 0.1.2
|
|
46
|
-
- - "
|
|
46
|
+
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
48
|
version: 0.1.2
|
|
49
49
|
- !ruby/object:Gem::Dependency
|
|
@@ -162,6 +162,7 @@ files:
|
|
|
162
162
|
- lib/appoptics_apm/frameworks/rails/inst/action_controller3.rb
|
|
163
163
|
- lib/appoptics_apm/frameworks/rails/inst/action_controller4.rb
|
|
164
164
|
- lib/appoptics_apm/frameworks/rails/inst/action_controller5.rb
|
|
165
|
+
- lib/appoptics_apm/frameworks/rails/inst/action_controller6.rb
|
|
165
166
|
- lib/appoptics_apm/frameworks/rails/inst/action_controller_api.rb
|
|
166
167
|
- lib/appoptics_apm/frameworks/rails/inst/action_view.rb
|
|
167
168
|
- lib/appoptics_apm/frameworks/rails/inst/action_view_30.rb
|
|
@@ -255,7 +256,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
255
256
|
- !ruby/object:Gem::Version
|
|
256
257
|
version: '0'
|
|
257
258
|
requirements: []
|
|
258
|
-
|
|
259
|
+
rubyforge_project:
|
|
260
|
+
rubygems_version: 2.6.11
|
|
259
261
|
signing_key:
|
|
260
262
|
specification_version: 4
|
|
261
263
|
summary: AppOptics APM performance instrumentation gem for Ruby
|