instana 1.193.3.pre1 → 1.193.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/.circleci/config.yml +18 -12
- data/.gitignore +2 -1
- data/Appraisals +4 -0
- data/gemfiles/cuba_30.gemfile +1 -0
- data/gemfiles/dalli_20.gemfile +1 -0
- data/gemfiles/excon_02.gemfile +1 -0
- data/gemfiles/graphql_10.gemfile +1 -0
- data/gemfiles/grpc_10.gemfile +1 -0
- data/gemfiles/net_http_01.gemfile +1 -0
- data/gemfiles/rack_16.gemfile +1 -0
- data/gemfiles/rack_20.gemfile +1 -0
- data/gemfiles/rails_42.gemfile +2 -0
- data/gemfiles/rails_50.gemfile +2 -0
- data/gemfiles/rails_52.gemfile +2 -0
- data/gemfiles/rails_60.gemfile +2 -0
- data/gemfiles/redis_40.gemfile +1 -0
- data/gemfiles/resque_122.gemfile +1 -0
- data/gemfiles/resque_20.gemfile +1 -0
- data/gemfiles/rest_client_16.gemfile +1 -0
- data/gemfiles/rest_client_20.gemfile +1 -0
- data/gemfiles/roda_20.gemfile +1 -0
- data/gemfiles/roda_30.gemfile +1 -0
- data/gemfiles/sidekiq_42.gemfile +1 -0
- data/gemfiles/sidekiq_50.gemfile +1 -0
- data/gemfiles/sinatra_14.gemfile +1 -0
- data/lib/instana/activators/action_controller_api.rb +18 -0
- data/lib/instana/activators/action_controller_base.rb +18 -0
- data/lib/instana/activators/action_view.rb +18 -0
- data/lib/instana/activators/active_record.rb +18 -0
- data/lib/instana/frameworks/rails.rb +20 -32
- data/lib/instana/instrumentation/action_controller.rb +81 -0
- data/lib/instana/instrumentation/action_view.rb +27 -0
- data/lib/instana/instrumentation/active_record.rb +47 -0
- data/lib/instana/version.rb +1 -1
- data/test/{frameworks/rails/actioncontroller_test.rb → instrumentation/rails_action_controller_test.rb} +37 -21
- data/test/instrumentation/rails_action_view_test.rb +138 -0
- data/test/instrumentation/rails_active_record_test.rb +121 -0
- data/test/support/apps/active_record/active_record.rb +21 -0
- metadata +19 -23
- data/lib/instana/frameworks/instrumentation/abstract_mysql_adapter.rb +0 -56
- data/lib/instana/frameworks/instrumentation/action_controller.rb +0 -194
- data/lib/instana/frameworks/instrumentation/action_view.rb +0 -39
- data/lib/instana/frameworks/instrumentation/active_record.rb +0 -27
- data/lib/instana/frameworks/instrumentation/mysql2_adapter.rb +0 -83
- data/lib/instana/frameworks/instrumentation/mysql_adapter.rb +0 -60
- data/lib/instana/frameworks/instrumentation/postgresql_adapter.rb +0 -99
- data/test/frameworks/rails/actionview3_test.rb +0 -210
- data/test/frameworks/rails/actionview4_test.rb +0 -208
- data/test/frameworks/rails/actionview5_test.rb +0 -221
- data/test/frameworks/rails/activerecord_test.rb +0 -279
- data/test/frameworks/rails_test.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '092873bb2c6b93365194d4cc70cbcdaf391c2423840358d1fc747fa063353b24'
|
4
|
+
data.tar.gz: 00bf12428b52ac42f97dc5d4a0182cdf5d6256913125ce38202560e2dcfb4dc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6029e3901cace8a446f00b438212b9aeaa073a5c3bb5051be7c8f7c68d361bfaabc2d3789e02eae6b2312a6066b874bb3a1ad4d193a71148510320e2b95d704f
|
7
|
+
data.tar.gz: 548311ebf421ff8df56b5c612dc75a509f290297b6de12d88c464832262a511e44ed4a9dc32125dc0c0856ebfe63da03854163e63ef4241dec886043ea3d945d
|
data/.circleci/config.yml
CHANGED
@@ -7,6 +7,7 @@ executors:
|
|
7
7
|
environment:
|
8
8
|
MEMCACHED_HOST: '127.0.0.1:11211'
|
9
9
|
REDIS_URL: 'redis://127.0.0.1:6379'
|
10
|
+
DATABASE_URL: 'sqlite3::memory:'
|
10
11
|
- image: memcached
|
11
12
|
- image: redis
|
12
13
|
ruby_26:
|
@@ -15,6 +16,7 @@ executors:
|
|
15
16
|
environment:
|
16
17
|
MEMCACHED_HOST: '127.0.0.1:11211'
|
17
18
|
REDIS_URL: 'redis://127.0.0.1:6379'
|
19
|
+
DATABASE_URL: 'sqlite3::memory:'
|
18
20
|
- image: memcached
|
19
21
|
- image: redis
|
20
22
|
ruby_27:
|
@@ -23,8 +25,9 @@ executors:
|
|
23
25
|
environment:
|
24
26
|
MEMCACHED_HOST: '127.0.0.1:11211'
|
25
27
|
REDIS_URL: 'redis://127.0.0.1:6379'
|
28
|
+
DATABASE_URL: 'sqlite3::memory:'
|
26
29
|
- image: memcached
|
27
|
-
- image: redis
|
30
|
+
- image: redis
|
28
31
|
ruby_25_mysql2:
|
29
32
|
docker:
|
30
33
|
- image: circleci/ruby:2.5-node
|
@@ -72,7 +75,7 @@ executors:
|
|
72
75
|
- image: postgres
|
73
76
|
environment:
|
74
77
|
POSTGRES_PASSWORD: 'test'
|
75
|
-
POSTGRES_DB: 'ci_test'
|
78
|
+
POSTGRES_DB: 'ci_test'
|
76
79
|
ruby_26_postgres:
|
77
80
|
docker:
|
78
81
|
- image: circleci/ruby:2.6-node
|
@@ -81,7 +84,7 @@ executors:
|
|
81
84
|
- image: postgres
|
82
85
|
environment:
|
83
86
|
POSTGRES_PASSWORD: 'test'
|
84
|
-
POSTGRES_DB: 'ci_test'
|
87
|
+
POSTGRES_DB: 'ci_test'
|
85
88
|
ruby_27_postgres:
|
86
89
|
docker:
|
87
90
|
- image: circleci/ruby:2.7-node
|
@@ -90,7 +93,7 @@ executors:
|
|
90
93
|
- image: postgres
|
91
94
|
environment:
|
92
95
|
POSTGRES_PASSWORD: 'test'
|
93
|
-
POSTGRES_DB: 'ci_test'
|
96
|
+
POSTGRES_DB: 'ci_test'
|
94
97
|
|
95
98
|
commands:
|
96
99
|
setup:
|
@@ -99,7 +102,7 @@ commands:
|
|
99
102
|
name: Install Java
|
100
103
|
command: |
|
101
104
|
sudo apt-get install openjdk-11-jdk
|
102
|
-
- run:
|
105
|
+
- run:
|
103
106
|
name: Update RubyGems
|
104
107
|
command: |
|
105
108
|
gem update --system
|
@@ -110,7 +113,7 @@ commands:
|
|
110
113
|
gem install bundler
|
111
114
|
bundler --version
|
112
115
|
bundle config set path './vendor/bundle'
|
113
|
-
- run:
|
116
|
+
- run:
|
114
117
|
name: Install Depdendecies
|
115
118
|
command: |
|
116
119
|
bundle check || bundle install
|
@@ -215,12 +218,15 @@ workflows:
|
|
215
218
|
jobs:
|
216
219
|
- test_apprisal:
|
217
220
|
matrix:
|
218
|
-
parameters:
|
219
|
-
stack:
|
220
|
-
-
|
221
|
-
-
|
222
|
-
-
|
223
|
-
-
|
221
|
+
parameters:
|
222
|
+
stack:
|
223
|
+
- ruby_27
|
224
|
+
- ruby_26
|
225
|
+
- ruby_25
|
226
|
+
- ruby_27_postgres
|
227
|
+
- ruby_26_postgres
|
228
|
+
- ruby_25_postgres
|
229
|
+
- ruby_27_mysql2
|
224
230
|
- ruby_26_mysql2
|
225
231
|
- ruby_25_mysql2
|
226
232
|
gemfile:
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
@@ -30,24 +30,28 @@ appraise 'rails-42' do
|
|
30
30
|
gem 'rails', '>= 4.2', '< 5.0'
|
31
31
|
gem 'mysql2', '0.4.10'
|
32
32
|
gem 'pg', '~> 0.21'
|
33
|
+
gem 'sqlite3', '~> 1.3', '< 1.4'
|
33
34
|
end
|
34
35
|
|
35
36
|
appraise 'rails-50' do
|
36
37
|
gem 'rails', '>= 5.0', '< 5.1'
|
37
38
|
gem 'mysql2', '0.4.10'
|
38
39
|
gem 'pg'
|
40
|
+
gem 'sqlite3', '~> 1.3', '< 1.4'
|
39
41
|
end
|
40
42
|
|
41
43
|
appraise 'rails-52' do
|
42
44
|
gem 'rails', '>= 5.2', '< 6.0'
|
43
45
|
gem 'mysql2', '0.4.10'
|
44
46
|
gem 'pg'
|
47
|
+
gem 'sqlite3', '~> 1.3', '< 1.4'
|
45
48
|
end
|
46
49
|
|
47
50
|
appraise 'rails-60' do
|
48
51
|
gem 'rails', '>= 6.0', '< 6.1'
|
49
52
|
gem 'mysql2', '0.4.10'
|
50
53
|
gem 'pg'
|
54
|
+
gem 'sqlite3', '~> 1.4'
|
51
55
|
end
|
52
56
|
|
53
57
|
appraise 'redis-40' do
|
data/gemfiles/cuba_30.gemfile
CHANGED
data/gemfiles/dalli_20.gemfile
CHANGED
data/gemfiles/excon_02.gemfile
CHANGED
data/gemfiles/graphql_10.gemfile
CHANGED
data/gemfiles/grpc_10.gemfile
CHANGED
data/gemfiles/rack_16.gemfile
CHANGED
data/gemfiles/rack_20.gemfile
CHANGED
data/gemfiles/rails_42.gemfile
CHANGED
@@ -7,10 +7,12 @@ gem "minitest", "5.9.1"
|
|
7
7
|
gem "minitest-reporters"
|
8
8
|
gem "webmock"
|
9
9
|
gem "puma"
|
10
|
+
gem "rubocop", "~> 1.9"
|
10
11
|
gem "rack-test"
|
11
12
|
gem "simplecov", "~> 0.21.2"
|
12
13
|
gem "rails", ">= 4.2", "< 5.0"
|
13
14
|
gem "mysql2", "0.4.10"
|
14
15
|
gem "pg", "~> 0.21"
|
16
|
+
gem "sqlite3", "~> 1.3", "< 1.4"
|
15
17
|
|
16
18
|
gemspec path: "../"
|
data/gemfiles/rails_50.gemfile
CHANGED
@@ -7,10 +7,12 @@ gem "minitest", "5.9.1"
|
|
7
7
|
gem "minitest-reporters"
|
8
8
|
gem "webmock"
|
9
9
|
gem "puma"
|
10
|
+
gem "rubocop", "~> 1.9"
|
10
11
|
gem "rack-test"
|
11
12
|
gem "simplecov", "~> 0.21.2"
|
12
13
|
gem "rails", ">= 5.0", "< 5.1"
|
13
14
|
gem "mysql2", "0.4.10"
|
14
15
|
gem "pg"
|
16
|
+
gem "sqlite3", "~> 1.3", "< 1.4"
|
15
17
|
|
16
18
|
gemspec path: "../"
|
data/gemfiles/rails_52.gemfile
CHANGED
@@ -7,10 +7,12 @@ gem "minitest", "5.9.1"
|
|
7
7
|
gem "minitest-reporters"
|
8
8
|
gem "webmock"
|
9
9
|
gem "puma"
|
10
|
+
gem "rubocop", "~> 1.9"
|
10
11
|
gem "rack-test"
|
11
12
|
gem "simplecov", "~> 0.21.2"
|
12
13
|
gem "rails", ">= 5.2", "< 6.0"
|
13
14
|
gem "mysql2", "0.4.10"
|
14
15
|
gem "pg"
|
16
|
+
gem "sqlite3", "~> 1.3", "< 1.4"
|
15
17
|
|
16
18
|
gemspec path: "../"
|
data/gemfiles/rails_60.gemfile
CHANGED
@@ -7,10 +7,12 @@ gem "minitest", "5.9.1"
|
|
7
7
|
gem "minitest-reporters"
|
8
8
|
gem "webmock"
|
9
9
|
gem "puma"
|
10
|
+
gem "rubocop", "~> 1.9"
|
10
11
|
gem "rack-test"
|
11
12
|
gem "simplecov", "~> 0.21.2"
|
12
13
|
gem "rails", ">= 6.0", "< 6.1"
|
13
14
|
gem "mysql2", "0.4.10"
|
14
15
|
gem "pg"
|
16
|
+
gem "sqlite3", "~> 1.4"
|
15
17
|
|
16
18
|
gemspec path: "../"
|
data/gemfiles/redis_40.gemfile
CHANGED
data/gemfiles/resque_122.gemfile
CHANGED
data/gemfiles/resque_20.gemfile
CHANGED
data/gemfiles/roda_20.gemfile
CHANGED
data/gemfiles/roda_30.gemfile
CHANGED
data/gemfiles/sidekiq_42.gemfile
CHANGED
data/gemfiles/sidekiq_50.gemfile
CHANGED
data/gemfiles/sinatra_14.gemfile
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Instana
|
2
|
+
module Activators
|
3
|
+
class ActionControllerAPI < Activator
|
4
|
+
def can_instrument?
|
5
|
+
defined?(::ActionController::API)
|
6
|
+
end
|
7
|
+
|
8
|
+
def instrument
|
9
|
+
require 'instana/instrumentation/action_controller'
|
10
|
+
|
11
|
+
::ActionController::API
|
12
|
+
.prepend(Instana::Instrumentation::ActionController)
|
13
|
+
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Instana
|
2
|
+
module Activators
|
3
|
+
class ActionControllerBase < Activator
|
4
|
+
def can_instrument?
|
5
|
+
defined?(::ActionController::Base)
|
6
|
+
end
|
7
|
+
|
8
|
+
def instrument
|
9
|
+
require 'instana/instrumentation/action_controller'
|
10
|
+
|
11
|
+
::ActionController::Base
|
12
|
+
.prepend(Instana::Instrumentation::ActionController)
|
13
|
+
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Instana
|
2
|
+
module Activators
|
3
|
+
class ActionView < Activator
|
4
|
+
def can_instrument?
|
5
|
+
defined?(::ActionView::PartialRenderer)
|
6
|
+
end
|
7
|
+
|
8
|
+
def instrument
|
9
|
+
require 'instana/instrumentation/action_view'
|
10
|
+
|
11
|
+
::ActionView::PartialRenderer
|
12
|
+
.prepend(Instana::Instrumentation::ActionView)
|
13
|
+
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Instana
|
2
|
+
module Activators
|
3
|
+
class ActiveRecord < Activator
|
4
|
+
def can_instrument?
|
5
|
+
defined?(::ActiveRecord::ConnectionAdapters::AbstractAdapter)
|
6
|
+
end
|
7
|
+
|
8
|
+
def instrument
|
9
|
+
require 'instana/instrumentation/active_record'
|
10
|
+
|
11
|
+
::ActiveRecord::ConnectionAdapters::AbstractAdapter
|
12
|
+
.prepend(Instana::Instrumentation::ActiveRecord)
|
13
|
+
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,39 +1,27 @@
|
|
1
|
-
|
1
|
+
if ::Rails::VERSION::MAJOR < 3
|
2
|
+
::Rails.configuration.after_initialize do
|
3
|
+
# In Rails, let's use the Rails logger
|
4
|
+
::Instana.logger = ::Rails.logger if ::Rails.logger
|
2
5
|
|
3
|
-
if
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
::Instana.logger
|
8
|
-
|
9
|
-
if ::Instana.config[:tracing][:enabled]
|
10
|
-
::Instana.logger.debug "Instrumenting Rack"
|
11
|
-
::Rails.configuration.middleware.insert 0, ::Instana::Rack
|
12
|
-
else
|
13
|
-
::Instana.logger.info "Rack: Tracing disabled via config. Not enabling middleware."
|
14
|
-
end
|
6
|
+
if ::Instana.config[:tracing][:enabled]
|
7
|
+
::Instana.logger.debug "Instrumenting Rack"
|
8
|
+
::Rails.configuration.middleware.insert 0, ::Instana::Rack
|
9
|
+
else
|
10
|
+
::Instana.logger.info "Rack: Tracing disabled via config. Not enabling middleware."
|
15
11
|
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
if ::Instana.config[:tracing][:enabled]
|
24
|
-
::Instana.logger.debug "Instrumenting Rack"
|
25
|
-
app.config.middleware.insert 0, ::Instana::Rack
|
26
|
-
else
|
27
|
-
::Instana.logger.info "Rack: Tracing disabled via config. Not enabling middleware."
|
28
|
-
end
|
29
|
-
end
|
12
|
+
end
|
13
|
+
else
|
14
|
+
module ::Instana
|
15
|
+
class Railtie < ::Rails::Railtie
|
16
|
+
initializer 'instana.rack' do |app|
|
17
|
+
# In Rails, let's use the Rails logger
|
18
|
+
::Instana.logger = ::Rails.logger if ::Rails.logger
|
30
19
|
|
31
20
|
if ::Instana.config[:tracing][:enabled]
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
21
|
+
::Instana.logger.debug "Instrumenting Rack"
|
22
|
+
app.config.middleware.insert 0, ::Instana::Rack
|
23
|
+
else
|
24
|
+
::Instana.logger.info "Rack: Tracing disabled via config. Not enabling middleware."
|
37
25
|
end
|
38
26
|
end
|
39
27
|
end
|