appoptics_apm 4.8.2 → 4.8.3
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 +4 -4
- data/.travis.yml +30 -15
- data/Gemfile +0 -1
- data/README.md +1 -1
- data/Rakefile +4 -1
- data/build_gem_upload_to_packagecloud.sh +1 -6
- data/examples/SDK/01_basic_tracing.rb +0 -2
- data/ext/oboe_metal/README.md +69 -0
- data/ext/oboe_metal/src/VERSION +1 -1
- data/lib/appoptics_apm/frameworks/rails/inst/action_controller.rb +5 -5
- data/lib/appoptics_apm/frameworks/rails/inst/action_view.rb +1 -1
- data/lib/appoptics_apm/frameworks/rails/inst/active_record.rb +2 -2
- data/lib/appoptics_apm/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c27f1f8e2eb4cd26fb79201841a19fd805a4121001b9d384a81854834990778
|
4
|
+
data.tar.gz: bf80c6401e81c17c4566ed597a3e94ad653f93f719583a0f47e2f5d3ca15af5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c198e1f9288bb934e97da00f10e69dd1a599d106b6e5e22940eb225c553d1e205cde734d71896ef3b63547fd03094f8846b627fd01ce73ff688818b3cb7465c
|
7
|
+
data.tar.gz: d326e1d4ad5689f97164709a68e5e4d7083b5879c4de3d5f966f1c7729a598f58c660264b31096724ea4c9038246f3579177338857f7d409f7bb8467acfdb0cf
|
data/.travis.yml
CHANGED
@@ -11,8 +11,8 @@ env:
|
|
11
11
|
- DBTYPE=mysql
|
12
12
|
|
13
13
|
rvm:
|
14
|
-
- 2.6.
|
15
|
-
- 2.5.
|
14
|
+
- 2.6.3
|
15
|
+
- 2.5.5
|
16
16
|
- 2.4.5
|
17
17
|
- ruby-head
|
18
18
|
# - jruby-9.0.5.0
|
@@ -32,13 +32,13 @@ matrix:
|
|
32
32
|
exclude:
|
33
33
|
- rvm: ruby-head
|
34
34
|
gemfile: gemfiles/rails42.gemfile
|
35
|
-
- rvm: 2.6.
|
35
|
+
- rvm: 2.6.3
|
36
36
|
gemfile: gemfiles/rails42.gemfile
|
37
37
|
|
38
38
|
|
39
|
-
- rmv: 2.6.
|
39
|
+
- rmv: 2.6.3
|
40
40
|
env: DBTYPE=mysql
|
41
|
-
- rvm: 2.5.
|
41
|
+
- rvm: 2.5.5
|
42
42
|
env: DBTYPE=mysql
|
43
43
|
- rvm: 2.4.5
|
44
44
|
env: DBTYPE=mysql
|
@@ -85,12 +85,15 @@ matrix:
|
|
85
85
|
# Attempt Travis/Cassandra fix re: https://github.com/travis-ci/travis-ci/issues/1484
|
86
86
|
# Updated Cassandra: https://github.com/travis-ci/travis-ci/issues/1650
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
-
|
93
|
-
- sudo
|
88
|
+
# the following is not working anymore on travis
|
89
|
+
# commenting it out as per AO-13532 as we currently don't have instrumentation
|
90
|
+
# for cassandra
|
91
|
+
#before_install:
|
92
|
+
# - sudo service cassandra stop
|
93
|
+
# - sudo sh -c "echo 'JVM_OPTS=\"\${JVM_OPTS} -Djava.net.preferIPv4Stack=false\"' >> /etc/cassandra/cassandra-env.sh"
|
94
|
+
# - echo "127.0.0.1 localhost" | sudo tee /etc/hosts
|
95
|
+
# - echo "127.0.0.1 " `hostname` | sudo tee -a /etc/hosts
|
96
|
+
# - sudo service cassandra start
|
94
97
|
|
95
98
|
install:
|
96
99
|
- curl -LO http://kent.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz
|
@@ -100,6 +103,13 @@ install:
|
|
100
103
|
- popd
|
101
104
|
|
102
105
|
before_script:
|
106
|
+
- export APPOPTICS_GEM_TEST=true
|
107
|
+
- export APPOPTICS_REPORTER=file
|
108
|
+
- export APPOPTICS_COLLECTOR=/tmp/appoptics_traces.bson
|
109
|
+
- export APPOPTICS_REPORTER_FILE_SINGLE=false
|
110
|
+
- export APPOPTICS_TOKEN_BUCKET_CAPACITY=1000
|
111
|
+
- export APPOPTICS_TOKEN_BUCKET_RATE=1000
|
112
|
+
- export OBOE_VERSION=5.1.1
|
103
113
|
- bundle update --jobs=3 --retry=3
|
104
114
|
- bundle exec rake fetch_ext_deps
|
105
115
|
- bundle exec rake clean
|
@@ -108,14 +118,19 @@ before_script:
|
|
108
118
|
- mysql -e 'create database travis_ci_test;'
|
109
119
|
- redis-server --requirepass secret_pass &
|
110
120
|
- sleep 10
|
111
|
-
- export APPOPTICS_TOKEN_BUCKET_CAPACITY=1000
|
112
|
-
- export APPOPTICS_TOKEN_BUCKET_RATE=1000
|
113
121
|
|
114
122
|
script: "N=1 bundle exec rake test"
|
115
123
|
|
116
124
|
services:
|
117
125
|
- mongodb
|
118
126
|
- memcached
|
119
|
-
-
|
120
|
-
# -
|
127
|
+
- mysql
|
128
|
+
# - cassandra
|
129
|
+
- postgresql
|
130
|
+
# - redis-server
|
121
131
|
- rabbitmq
|
132
|
+
|
133
|
+
addons:
|
134
|
+
apt:
|
135
|
+
packages:
|
136
|
+
- rabbitmq-server
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -390,4 +390,4 @@ See the README in the test directory.
|
|
390
390
|
|
391
391
|
Copyright (c) 2018 SolarWinds, LLC
|
392
392
|
|
393
|
-
Released under the [Librato Open License](https://docs.appoptics.com/kb/apm_tracing/librato-open-license/)
|
393
|
+
Released under the [Librato Open License](https://docs.appoptics.com/kb/apm_tracing/librato-open-license/)
|
data/Rakefile
CHANGED
@@ -31,6 +31,9 @@ Rake::TestTask.new do |t|
|
|
31
31
|
if Rails::VERSION::MAJOR == 5
|
32
32
|
t.test_files = FileList["test/frameworks/rails#{Rails::VERSION::MAJOR}x_test.rb"] +
|
33
33
|
FileList["test/frameworks/rails#{Rails::VERSION::MAJOR}x_api_test.rb"]
|
34
|
+
elsif Rails::VERSION::MAJOR == 6
|
35
|
+
t.test_files = FileList["test/frameworks/rails5x_test.rb"] +
|
36
|
+
FileList["test/frameworks/rails5x_api_test.rb"]
|
34
37
|
else
|
35
38
|
t.test_files = FileList["test/frameworks/rails#{Rails::VERSION::MAJOR}x_test.rb"]
|
36
39
|
end
|
@@ -121,7 +124,7 @@ task :fetch_ext_deps do
|
|
121
124
|
|
122
125
|
FileUtils.cd(ext_src_dir) do
|
123
126
|
system('swig -c++ -ruby -module oboe_metal oboe.i')
|
124
|
-
|
127
|
+
FileUtils.rm('oboe.i')
|
125
128
|
end
|
126
129
|
end
|
127
130
|
|
@@ -8,13 +8,8 @@ else
|
|
8
8
|
./build_gem.sh
|
9
9
|
fi
|
10
10
|
|
11
|
-
|
12
|
-
current_ruby=`rbenv global`
|
13
|
-
rbenv global 2.4.1
|
11
|
+
gem install package_cloud --no-document
|
14
12
|
|
15
13
|
# prerequisite: package_cloud token needs to be in ~/.packagecloud
|
16
14
|
gem=`ls -dt1 appoptics_apm-[^pre]*.gem | head -1`
|
17
15
|
package_cloud push solarwinds/appoptics-apm-ruby $gem
|
18
|
-
|
19
|
-
# restore ruby version
|
20
|
-
rbenv global $current_ruby
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Debug the c-code with gdb
|
2
|
+
|
3
|
+
inspired by: https://dev.to/wataash/how-to-create-and-debug-ruby-gem-with-c-native-extension-3l8b
|
4
|
+
|
5
|
+
|
6
|
+
## install ruby with sources
|
7
|
+
|
8
|
+
rbenv is your friend ;) 😄 -k means keep sources
|
9
|
+
|
10
|
+
```
|
11
|
+
rbenv install -k 2.6.3
|
12
|
+
rbenv shell 2.6.3
|
13
|
+
|
14
|
+
# check that ruby is debuggable
|
15
|
+
type ruby # => ruby is /home/wsh/.rbenv/shims/ruby
|
16
|
+
rbenv which ruby # => /home/wsh/.rbenv/versions/2.6.3/bin/ruby
|
17
|
+
```
|
18
|
+
|
19
|
+
|
20
|
+
##
|
21
|
+
## add debug info when compiling appoptics_apm
|
22
|
+
add this line to extconf.rb to turn off optimization
|
23
|
+
|
24
|
+
```
|
25
|
+
CONFIG["optflags"] = "-O0"
|
26
|
+
```
|
27
|
+
|
28
|
+
|
29
|
+
##
|
30
|
+
## start ruby app with gdb
|
31
|
+
|
32
|
+
This will run ruby and load the app with a breakpoint in the Reporter::startThread
|
33
|
+
c-function.
|
34
|
+
|
35
|
+
`bundle exec gdb -q -ex 'set breakpoint pending on' -ex 'b Reporter::startThread' -ex run --args ruby -e 'require "./app"'`
|
36
|
+
|
37
|
+
If there is a bug in the ruby code or a ruby byebug binding that halts the
|
38
|
+
script, the debugger will hang without showing any output.
|
39
|
+
So, make sure `bundle exec ruby app.rb` runs.
|
40
|
+
|
41
|
+
use the gdb navigation commands to step through the code. If it says:
|
42
|
+
|
43
|
+
```
|
44
|
+
(gdb) n
|
45
|
+
Single stepping until exit from function _ZN8Reporter11startThreadEv@plt,
|
46
|
+
which has no line number information.
|
47
|
+
```
|
48
|
+
|
49
|
+
type `c` and it may end up stopping in the right location.
|
50
|
+
|
51
|
+
##
|
52
|
+
## make ruby .gdbinit macros available
|
53
|
+
|
54
|
+
These macros are pretty elaborate. They are checked in the ruby github
|
55
|
+
repo: https://github.com/ruby/ruby/blob/master/.gdbinit
|
56
|
+
The code is nicely formatted and colorized in github and easiest to read there.
|
57
|
+
|
58
|
+
installation in the user's home dir:
|
59
|
+
```
|
60
|
+
wget https://github.com/ruby/ruby/blob/master/.gdbinit
|
61
|
+
```
|
62
|
+
##
|
63
|
+
## examples
|
64
|
+
|
65
|
+
Some inspiring examples here:
|
66
|
+
|
67
|
+
https://jvns.ca/blog/2016/06/12/a-weird-system-call-process-vm-readv/
|
68
|
+
|
69
|
+
https://medium.com/@zanker/finding-a-ruby-bug-with-gdb-56d6b321bc86
|
data/ext/oboe_metal/src/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.1.1
|
@@ -84,18 +84,18 @@ module AppOpticsAPM
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# ActionController::Base
|
87
|
-
if defined?(ActionController::Base) && AppOpticsAPM::Config[:action_controller][:enabled]
|
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)
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
# ActionController::API - Rails 5
|
98
|
-
if defined?(ActionController::API) && AppOpticsAPM::Config[:action_controller_api][:enabled]
|
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 < 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)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2016 SolarWinds, LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
|
4
|
-
if defined?(ActionView::Base) && AppOpticsAPM::Config[:action_view][:enabled]
|
4
|
+
if defined?(ActionView::Base) && AppOpticsAPM::Config[:action_view][:enabled] && Rails::VERSION::MAJOR < 6
|
5
5
|
|
6
6
|
##
|
7
7
|
# ActionView Instrumentation is version dependent. ActionView 2.x is separate
|
@@ -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)
|
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
|
-
|
14
|
+
elsif Rails::VERSION::MAJOR == 5
|
15
15
|
require 'appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x'
|
16
16
|
end
|
17
17
|
|
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.3
|
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-08-28 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
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- build_gem_upload_to_packagecloud.sh
|
133
133
|
- examples/SDK/01_basic_tracing.rb
|
134
134
|
- examples/carrying_context.rb
|
135
|
+
- ext/oboe_metal/README.md
|
135
136
|
- ext/oboe_metal/extconf.rb
|
136
137
|
- ext/oboe_metal/lib/.keep
|
137
138
|
- ext/oboe_metal/noop/noop.c
|
@@ -254,8 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
255
|
- !ruby/object:Gem::Version
|
255
256
|
version: '0'
|
256
257
|
requirements: []
|
257
|
-
|
258
|
-
rubygems_version: 2.7.3
|
258
|
+
rubygems_version: 3.0.2
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: AppOptics APM performance instrumentation gem for Ruby
|