traceview 3.0.2-java → 3.0.3-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +39 -14
  3. data/Gemfile +4 -62
  4. data/Rakefile +23 -8
  5. data/gemfiles/frameworks.gemfile +40 -0
  6. data/gemfiles/libraries.gemfile +78 -0
  7. data/gemfiles/rails23.gemfile +47 -0
  8. data/gemfiles/rails30.gemfile +47 -0
  9. data/gemfiles/rails31.gemfile +47 -0
  10. data/gemfiles/rails32.gemfile +47 -0
  11. data/gemfiles/rails40.gemfile +35 -0
  12. data/gemfiles/rails41.gemfile +35 -0
  13. data/gemfiles/rails42.gemfile +35 -0
  14. data/lib/traceview/api/logging.rb +84 -38
  15. data/lib/traceview/frameworks/rails/inst/action_controller.rb +1 -1
  16. data/lib/traceview/inst/moped.rb +2 -2
  17. data/lib/traceview/util.rb +30 -34
  18. data/lib/traceview/version.rb +1 -1
  19. data/test/frameworks/apps/grape_nested.rb +3 -0
  20. data/test/frameworks/apps/grape_simple.rb +3 -0
  21. data/test/frameworks/apps/sinatra_simple.rb +3 -0
  22. data/test/frameworks/grape_test.rb +8 -4
  23. data/test/frameworks/padrino_test.rb +6 -2
  24. data/test/frameworks/rails2x_test.rb +3 -0
  25. data/test/frameworks/rails3x_test.rb +91 -0
  26. data/test/frameworks/rails4x_test.rb +89 -0
  27. data/test/frameworks/sinatra_test.rb +3 -0
  28. data/test/instrumentation/cassandra_test.rb +11 -4
  29. data/test/instrumentation/dalli_test.rb +3 -0
  30. data/test/instrumentation/em_http_request_test.rb +3 -0
  31. data/test/instrumentation/excon_test.rb +3 -0
  32. data/test/instrumentation/faraday_test.rb +3 -0
  33. data/test/instrumentation/http_test.rb +3 -0
  34. data/test/instrumentation/httpclient_test.rb +3 -0
  35. data/test/instrumentation/memcache_test.rb +9 -0
  36. data/test/instrumentation/memcached_test.rb +3 -0
  37. data/test/instrumentation/mongo_test.rb +14 -3
  38. data/test/instrumentation/moped_test.rb +29 -6
  39. data/test/instrumentation/rack_test.rb +3 -0
  40. data/test/instrumentation/redis_hashes_test.rb +187 -184
  41. data/test/instrumentation/redis_keys_test.rb +223 -220
  42. data/test/instrumentation/redis_lists_test.rb +225 -225
  43. data/test/instrumentation/redis_misc_test.rb +123 -120
  44. data/test/instrumentation/redis_sets_test.rb +216 -213
  45. data/test/instrumentation/redis_sortedsets_test.rb +245 -242
  46. data/test/instrumentation/redis_strings_test.rb +242 -238
  47. data/test/instrumentation/resque_test.rb +3 -0
  48. data/test/instrumentation/rest-client_test.rb +3 -0
  49. data/test/instrumentation/sequel_mysql2_test.rb +4 -1
  50. data/test/instrumentation/sequel_mysql_test.rb +4 -1
  51. data/test/instrumentation/sequel_pg_test.rb +4 -1
  52. data/test/minitest_helper.rb +25 -8
  53. data/test/profiling/method_test.rb +3 -0
  54. data/test/servers/rackapp_8101.rb +1 -1
  55. data/test/servers/rails2x_8140.rb +2 -2
  56. data/test/servers/rails3x_8140.rb +78 -0
  57. data/test/servers/rails4x_8140.rb +78 -0
  58. data/test/support/backcompat_test.rb +3 -0
  59. data/test/support/config_test.rb +3 -0
  60. data/test/support/dnt_test.rb +3 -0
  61. data/test/support/liboboe_settings_test.rb +3 -0
  62. data/test/support/tvalias_test.rb +3 -0
  63. data/test/support/xtrace_test.rb +3 -0
  64. metadata +19 -5
  65. data/Appraisals +0 -10
  66. data/gemfiles/mongo.gemfile +0 -33
  67. data/gemfiles/moped.gemfile +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e68c98dd85b4d497aa11725c0cb0b6c00f8d13f
4
- data.tar.gz: 417a5fd2832ab517c553306fe83571301d7c559e
3
+ metadata.gz: 43b520d89cefd876fc9a2f8b313545ef95080ab2
4
+ data.tar.gz: 3ae2c83c67989a07a31ce5f5beb459363fa5ed98
5
5
  SHA512:
6
- metadata.gz: 025c32911cf43d88a79b053df70740f44595e6769b528285734a344896cb9ba9bbebff3254db07a493a5fbd1e0a64fe8b137e76b8e5525cba4a545b2042af278
7
- data.tar.gz: 2e213936151b38b5c9a50c46018f4629421a29e1171055f50c6163f5fca1f3138de19e7061f2aa4a3cec42ea70e2c19940f85be13c7ff6cae5b7773a2128f806
6
+ metadata.gz: 4e14dd246f3df28b8878effde4fab9e7df22329d252cc49271c06171ec71c67715db47a542301617396ba6bebc7c282106d1428e41f9967c5a9ef1eb265a6165
7
+ data.tar.gz: 9f149841a799d04c72cd12c65d87c608057f383932a0c47f46779e42254bfc25b217eb4cc6dc04c2e4d3df2b31d66429fdf7b4b0b18976dfcc85a3d6d424f036
data/.travis.yml CHANGED
@@ -6,18 +6,50 @@ cache:
6
6
  - vendor/bundle
7
7
 
8
8
  rvm:
9
- - 2.2.0
10
- - 2.1.1
9
+ - 2.2.2
10
+ - 2.1.6
11
11
  - 2.0.0
12
12
  - 1.9.3
13
- - 1.9.2
14
13
  - 1.8.7
15
14
  - ree
16
15
  - jruby-19mode
17
16
 
18
- #gemfile:
19
- # - gemfiles/mongo.gemfile
20
- # - gemfiles/moped.gemfile
17
+ gemfile:
18
+ - gemfiles/libraries.gemfile
19
+ - gemfiles/frameworks.gemfile
20
+ - gemfiles/rails30.gemfile
21
+ - gemfiles/rails31.gemfile
22
+ - gemfiles/rails32.gemfile
23
+ - gemfiles/rails40.gemfile
24
+ - gemfiles/rails41.gemfile
25
+ - gemfiles/rails42.gemfile
26
+
27
+ matrix:
28
+ exclude:
29
+ # Rails 4.0+ requires Ruby 1.9.3 or higher
30
+ - rvm: 1.8.7
31
+ gemfile: gemfiles/rails40.gemfile
32
+ - rvm: 1.8.7
33
+ gemfile: gemfiles/rails41.gemfile
34
+ - rvm: 1.8.7
35
+ gemfile: gemfiles/rails42.gemfile
36
+ - rvm: ree
37
+ gemfile: gemfiles/rails40.gemfile
38
+ - rvm: ree
39
+ gemfile: gemfiles/rails41.gemfile
40
+ - rvm: ree
41
+ gemfile: gemfiles/rails42.gemfile
42
+
43
+ # Other frameworks tested on Ruby 1.9.3 or higher
44
+ - rvm: 1.8.7
45
+ gemfile: gemfiles/frameworks.gemfile
46
+ - rvm: ree
47
+ gemfile: gemfiles/frameworks.gemfile
48
+
49
+ allow_failures:
50
+ # FIXME: Until the joboe test reporter supports cross thread
51
+ # event collection.
52
+ - rvm: jruby-19mode
21
53
 
22
54
  # Attempt Travis/Cassandra fix re: https://github.com/travis-ci/travis-ci/issues/1484
23
55
  # Updated Cassandra: https://github.com/travis-ci/travis-ci/issues/1650
@@ -36,7 +68,7 @@ install:
36
68
  - sudo apt-get install -y tracelytics-java-agent
37
69
 
38
70
  before_script:
39
- - bundle install --without development
71
+ - bundle install --jobs=3 --retry=3 --without development
40
72
  - bundle exec rake compile
41
73
  - psql -c 'create database travis_ci_test;' -U postgres
42
74
  - mysql -e 'create database travis_ci_test;'
@@ -49,10 +81,3 @@ services:
49
81
  - memcached
50
82
  - cassandra
51
83
  - redis
52
-
53
- matrix:
54
- allow_failures:
55
- # FIXME: Until the joboe test reporter supports cross thread
56
- # event collection.
57
- - rvm: jruby-19mode
58
-
data/Gemfile CHANGED
@@ -1,20 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development, :test do
4
- gem 'minitest', "5.5.1"
4
+ gem 'rake'
5
+ gem 'minitest'
5
6
  gem 'minitest-reporters'
6
7
  gem 'minitest-debugger', :require => false
7
8
  gem 'rack-test'
8
9
  gem 'puma'
9
10
  if RUBY_VERSION < '1.9.3'
10
- # i18n 0.7.0 dropped support for Ruby 1.9.2 and older. ActiveSupport
11
- # depends on i18n 0.7.0 since v 4.0.5. For < 1.9.2 Ruby support, lock
12
- # down to these versions to maintain functionality.
13
- gem 'i18n', '< 0.7.0'
14
- gem 'activesupport', '< 4.0.5'
15
- gem 'appraisal'
11
+ gem 'bson', '<= 1.12.3'
16
12
  else
17
- gem 'appraisal'
13
+ gem 'bson'
18
14
  end
19
15
  end
20
16
 
@@ -31,65 +27,11 @@ group :development do
31
27
  end
32
28
  end
33
29
 
34
- # Instrumented gems
35
- gem 'dalli'
36
- gem 'memcache-client'
37
- gem 'cassandra'
38
- gem 'mongo'
39
- gem 'resque'
40
- gem 'redis'
41
- gem 'faraday'
42
- gem 'httpclient'
43
- gem 'excon'
44
- gem 'typhoeus'
45
- gem 'sequel'
46
- if RUBY_VERSION >= '1.9.3'
47
- # rest-client depends on mime-types gem which only supports
48
- # ruby 1.9.3 and up
49
- gem 'rest-client'
50
- end
51
-
52
- # Database adapter gems needed by sequel
53
- if defined?(JRUBY_VERSION)
54
- gem 'jdbc-postgresql'
55
- gem 'jdbc-mysql'
56
- else
57
- gem 'mysql'
58
- gem 'mysql2'
59
- if RUBY_VERSION < '1.9.3'
60
- gem 'pg', '0.17.1'
61
- else
62
- gem 'pg'
63
- end
64
- end
65
-
66
- if RUBY_VERSION >= '1.9'
67
- gem 'moped'
68
- gem 'eventmachine'
69
- gem 'em-synchrony'
70
- gem 'em-http-request'
71
- end
72
-
73
- unless defined?(JRUBY_VERSION)
74
- gem 'memcached', '1.7.2' if RUBY_VERSION < '2.0.0'
75
- gem 'bson_ext' # For Mongo, Yours Truly
76
- end
77
-
78
- # Instrumented Frameworks
79
-
80
30
  if defined?(JRUBY_VERSION)
81
31
  gem 'sinatra', :require => false
82
32
  else
83
33
  gem 'sinatra'
84
34
  end
85
35
 
86
- if RUBY_VERSION >= '1.9.3'
87
- gem 'padrino', '0.12.0'
88
- gem 'grape'
89
- gem 'bson'
90
- else
91
- gem 'bson', '1.10.2'
92
- end
93
-
94
36
  gemspec
95
37
 
data/Rakefile CHANGED
@@ -3,11 +3,32 @@
3
3
  require 'rubygems'
4
4
  require 'bundler/setup'
5
5
  require 'rake/testtask'
6
- require 'appraisal'
7
6
 
8
7
  Rake::TestTask.new do |t|
9
8
  t.libs << "test"
10
- t.test_files = FileList['test/**/*_test.rb']
9
+
10
+ # Since we support so many libraries and frameworks, tests
11
+ # runs are segmented into gemfiles that have different
12
+ # sets and versions of gems (libraries and frameworks).
13
+ #
14
+ # Here we detect the Gemfile the tests are being run against
15
+ # and load the appropriate tests.
16
+ #
17
+ case File.basename(ENV['BUNDLE_GEMFILE'])
18
+ when /rails/
19
+ # Pre-load rails to get the major version number
20
+ require 'rails'
21
+ t.test_files = FileList["test/frameworks/rails#{Rails::VERSION::MAJOR}x_test.rb"]
22
+ when /frameworks/
23
+ t.test_files = FileList['test/frameworks/grape*_test.rb']
24
+ t.test_files = FileList['test/frameworks/padrino*_test.rb']
25
+ t.test_files = FileList['test/frameworks/sinatra*_test.rb']
26
+ when /libraries/
27
+ t.test_files = FileList['test/support/*_test.rb'] +
28
+ FileList['test/instrumentation/*_test.rb'] +
29
+ FileList['test/profiling/*_test.rb']
30
+ end
31
+
11
32
  t.verbose = true
12
33
  t.ruby_opts = []
13
34
  # t.ruby_opts << ['-w']
@@ -16,12 +37,6 @@ Rake::TestTask.new do |t|
16
37
  end
17
38
  end
18
39
 
19
- if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
20
- task :default => :appraisal
21
- else
22
- task :default => :test
23
- end
24
-
25
40
  desc "Build the gem's c extension"
26
41
  task :compile do
27
42
  unless defined?(JRUBY_VERSION)
@@ -0,0 +1,40 @@
1
+ source "https://rubygems.org"
2
+
3
+ group :development, :test do
4
+ gem 'rake'
5
+ gem 'minitest'
6
+ gem 'minitest-reporters'
7
+ gem 'minitest-debugger', :require => false
8
+ gem 'rack-test'
9
+ gem 'puma'
10
+ if RUBY_VERSION < '1.9.3'
11
+ gem 'bson', '<= 1.12.3'
12
+ else
13
+ gem 'bson'
14
+ end
15
+ end
16
+
17
+ group :development do
18
+ gem 'ruby-debug', :platforms => [ :mri_18, :jruby ]
19
+ gem 'debugger', :platform => :mri_19
20
+ gem 'byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
21
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
22
+ if RUBY_VERSION > '1.8.7'
23
+ gem 'pry'
24
+ gem 'pry-byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
25
+ else
26
+ gem 'pry', '0.9.12.4'
27
+ end
28
+ end
29
+
30
+ if defined?(JRUBY_VERSION)
31
+ gem 'sinatra', :require => false
32
+ else
33
+ gem 'sinatra'
34
+ end
35
+
36
+ gem "grape"
37
+ gem "padrino"
38
+
39
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
40
+ # vim:syntax=ruby
@@ -0,0 +1,78 @@
1
+ source "https://rubygems.org"
2
+
3
+ if RUBY_VERSION >= '1.9.3'
4
+ # rest-client depends on mime-types gem which only supports
5
+ # ruby 1.9.3 and up
6
+ gem 'rest-client'
7
+ gem 'moped'
8
+ gem 'eventmachine'
9
+ gem 'em-synchrony'
10
+ gem 'em-http-request'
11
+ end
12
+
13
+ group :development, :test do
14
+ gem 'rake'
15
+ gem 'minitest'
16
+ gem 'minitest-reporters'
17
+ gem 'minitest-debugger', :require => false
18
+ gem 'rack-test'
19
+ gem 'puma'
20
+ if RUBY_VERSION < '1.9.3'
21
+ gem 'bson', '<= 1.12.3'
22
+ else
23
+ gem 'bson'
24
+ end
25
+ end
26
+
27
+ group :development do
28
+ gem 'ruby-debug', :platforms => [ :mri_18, :jruby ]
29
+ gem 'debugger', :platform => :mri_19
30
+ gem 'byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
31
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
32
+ if RUBY_VERSION > '1.8.7'
33
+ gem 'pry'
34
+ gem 'pry-byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
35
+ else
36
+ gem 'pry', '0.9.12.4'
37
+ end
38
+ end
39
+
40
+ if defined?(JRUBY_VERSION)
41
+ gem 'sinatra', :require => false
42
+ else
43
+ gem 'sinatra'
44
+ end
45
+
46
+ gem 'dalli'
47
+ gem 'memcache-client'
48
+ gem 'cassandra'
49
+ gem 'mongo'
50
+ gem 'resque'
51
+ gem 'redis'
52
+ gem 'faraday'
53
+ gem 'httpclient'
54
+ gem 'excon'
55
+ gem 'typhoeus'
56
+ gem 'sequel'
57
+
58
+ # Database adapter gems needed by sequel
59
+ if defined?(JRUBY_VERSION)
60
+ gem 'jdbc-postgresql'
61
+ gem 'jdbc-mysql'
62
+ else
63
+ gem 'mysql'
64
+ gem 'mysql2'
65
+ if RUBY_VERSION < '1.9.3'
66
+ gem 'pg', '0.17.1'
67
+ else
68
+ gem 'pg'
69
+ end
70
+ end
71
+
72
+ unless defined?(JRUBY_VERSION)
73
+ gem 'memcached', '1.7.2' if RUBY_VERSION < '2.0.0'
74
+ gem 'bson_ext' # For Mongo, Yours Truly
75
+ end
76
+
77
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
78
+ # vim:syntax=ruby
@@ -0,0 +1,47 @@
1
+ source "https://rubygems.org"
2
+
3
+ if RUBY_VERSION < '1.9.3'
4
+ # i18n 0.7.0 dropped support for Ruby 1.9.2 and older. ActiveSupport
5
+ # depends on i18n 0.7.0 since v 4.0.5. For < 1.9.2 Ruby support, lock
6
+ # down to these versions to maintain functionality.
7
+ gem 'i18n', '< 0.7.0'
8
+ gem 'activesupport', '< 4.0'
9
+ end
10
+
11
+ group :development, :test do
12
+ gem 'rake'
13
+ gem 'minitest'
14
+ gem 'minitest-reporters'
15
+ gem 'minitest-debugger', :require => false
16
+ gem 'rack-test'
17
+ gem 'puma'
18
+ if RUBY_VERSION < '1.9.3'
19
+ gem 'bson', '<= 1.12.3'
20
+ else
21
+ gem 'bson'
22
+ end
23
+ end
24
+
25
+ group :development do
26
+ gem 'ruby-debug', :platforms => [ :mri_18, :jruby ]
27
+ gem 'debugger', :platform => :mri_19
28
+ gem 'byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
29
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
30
+ if RUBY_VERSION > '1.8.7'
31
+ gem 'pry'
32
+ gem 'pry-byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
33
+ else
34
+ gem 'pry', '0.9.12.4'
35
+ end
36
+ end
37
+
38
+ if defined?(JRUBY_VERSION)
39
+ gem 'sinatra', :require => false
40
+ else
41
+ gem 'sinatra'
42
+ end
43
+
44
+ gem "rails", "~>2.3"
45
+
46
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
47
+ # vim:syntax=ruby
@@ -0,0 +1,47 @@
1
+ source "https://rubygems.org"
2
+
3
+ if RUBY_VERSION < '1.9.3'
4
+ # i18n 0.7.0 dropped support for Ruby 1.9.2 and older. ActiveSupport
5
+ # depends on i18n 0.7.0 since v 4.0.5. For < 1.9.2 Ruby support, lock
6
+ # down to these versions to maintain functionality.
7
+ gem 'i18n', '< 0.7.0'
8
+ gem 'activesupport', '< 4.0'
9
+ end
10
+
11
+ group :development, :test do
12
+ gem 'rake'
13
+ gem 'minitest'
14
+ gem 'minitest-reporters'
15
+ gem 'minitest-debugger', :require => false
16
+ gem 'rack-test'
17
+ gem 'puma'
18
+ if RUBY_VERSION < '1.9.3'
19
+ gem 'bson', '<= 1.12.3'
20
+ else
21
+ gem 'bson'
22
+ end
23
+ end
24
+
25
+ group :development do
26
+ gem 'ruby-debug', :platforms => [ :mri_18, :jruby ]
27
+ gem 'debugger', :platform => :mri_19
28
+ gem 'byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
29
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
30
+ if RUBY_VERSION > '1.8.7'
31
+ gem 'pry'
32
+ gem 'pry-byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
33
+ else
34
+ gem 'pry', '0.9.12.4'
35
+ end
36
+ end
37
+
38
+ if defined?(JRUBY_VERSION)
39
+ gem 'sinatra', :require => false
40
+ else
41
+ gem 'sinatra'
42
+ end
43
+
44
+ gem "rails", "~>3.0"
45
+
46
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
47
+ # vim:syntax=ruby
@@ -0,0 +1,47 @@
1
+ source "https://rubygems.org"
2
+
3
+ if RUBY_VERSION < '1.9.3'
4
+ # i18n 0.7.0 dropped support for Ruby 1.9.2 and older. ActiveSupport
5
+ # depends on i18n 0.7.0 since v 4.0.5. For < 1.9.2 Ruby support, lock
6
+ # down to these versions to maintain functionality.
7
+ gem 'i18n', '< 0.7.0'
8
+ gem 'activesupport', '< 4.0'
9
+ end
10
+
11
+ group :development, :test do
12
+ gem 'rake'
13
+ gem 'minitest'
14
+ gem 'minitest-reporters'
15
+ gem 'minitest-debugger', :require => false
16
+ gem 'rack-test'
17
+ gem 'puma'
18
+ if RUBY_VERSION < '1.9.3'
19
+ gem 'bson', '<= 1.12.3'
20
+ else
21
+ gem 'bson'
22
+ end
23
+ end
24
+
25
+ group :development do
26
+ gem 'ruby-debug', :platforms => [ :mri_18, :jruby ]
27
+ gem 'debugger', :platform => :mri_19
28
+ gem 'byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
29
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
30
+ if RUBY_VERSION > '1.8.7'
31
+ gem 'pry'
32
+ gem 'pry-byebug', :platforms => [ :mri_20, :mri_21, :mri_22 ]
33
+ else
34
+ gem 'pry', '0.9.12.4'
35
+ end
36
+ end
37
+
38
+ if defined?(JRUBY_VERSION)
39
+ gem 'sinatra', :require => false
40
+ else
41
+ gem 'sinatra'
42
+ end
43
+
44
+ gem "rails", "~>3.1"
45
+
46
+ gemspec :path => File.expand_path(File.dirname(__FILE__) + '/../')
47
+ # vim:syntax=ruby