oboe 1.4.2.2 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +30 -0
  3. data/Gemfile.lock +103 -0
  4. data/Guardfile +24 -0
  5. data/README.md +36 -0
  6. data/Rakefile +12 -0
  7. data/ext/oboe_metal/extconf.rb +12 -4
  8. data/ext/oboe_metal/tests/test.rb +7 -0
  9. data/get_version.rb +5 -0
  10. data/lib/joboe_metal.rb +45 -0
  11. data/lib/oboe.rb +16 -7
  12. data/lib/oboe/api/logging.rb +1 -1
  13. data/lib/oboe/api/tracing.rb +1 -1
  14. data/lib/oboe/api/util.rb +1 -1
  15. data/lib/oboe/config.rb +0 -47
  16. data/lib/oboe/frameworks/rails.rb +9 -7
  17. data/lib/oboe/frameworks/rails/inst/action_controller.rb +1 -1
  18. data/lib/oboe/frameworks/rails/inst/action_view.rb +8 -8
  19. data/lib/oboe/frameworks/rails/inst/active_record.rb +18 -18
  20. data/lib/oboe/inst/cassandra.rb +3 -3
  21. data/lib/oboe/inst/dalli.rb +2 -2
  22. data/lib/oboe/inst/http.rb +1 -1
  23. data/lib/oboe/inst/memcache.rb +4 -4
  24. data/lib/oboe/inst/memcached.rb +2 -2
  25. data/lib/oboe/inst/mongo.rb +1 -1
  26. data/lib/oboe/inst/moped.rb +5 -5
  27. data/lib/oboe/inst/resque.rb +4 -4
  28. data/lib/oboe/instrumentation.rb +1 -1
  29. data/lib/oboe/loading.rb +8 -3
  30. data/lib/oboe/logger.rb +39 -0
  31. data/lib/oboe/version.rb +4 -4
  32. data/lib/oboe_metal.rb +67 -27
  33. data/oboe.gemspec +19 -0
  34. data/oboe_fu.gemspec +13 -0
  35. data/release.sh +65 -0
  36. data/spec/instrumentation/cassandra_spec.rb +18 -0
  37. data/spec/instrumentation/dalli_spec.rb +14 -0
  38. data/spec/instrumentation/http_spec.rb +14 -0
  39. data/spec/instrumentation/memcache_spec.rb +19 -0
  40. data/spec/instrumentation/memcached_spec.rb +22 -0
  41. data/spec/instrumentation/mongo_spec.rb +29 -0
  42. data/spec/instrumentation/moped_spec.rb +41 -0
  43. data/spec/instrumentation/resque_spec.rb +18 -0
  44. data/spec/spec_helper.rb +15 -0
  45. data/spec/support/config_spec.rb +27 -0
  46. data/spec/support/oboe_spec.rb +4 -0
  47. metadata +100 -41
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oboe::Inst::Mongo do
4
+ it 'Stock Mongo should be loaded, defined and ready' do
5
+ defined?(::Mongo).should_not == nil
6
+ defined?(::Mongo::DB).should_not == nil
7
+ defined?(::Mongo::Cursor).should_not == nil
8
+ defined?(::Mongo::Collection).should_not == nil
9
+ end
10
+
11
+ it 'Mongo should have oboe methods defined' do
12
+ Oboe::Inst::Mongo::DB_OPS.each do |m|
13
+ ::Mongo::DB.method_defined?("#{m}_with_oboe").should == true
14
+ end
15
+ Oboe::Inst::Mongo::CURSOR_OPS.each do |m|
16
+ ::Mongo::Cursor.method_defined?("#{m}_with_oboe").should == true
17
+ end
18
+ Oboe::Inst::Mongo::COLL_WRITE_OPS.each do |m|
19
+ ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
20
+ end
21
+ Oboe::Inst::Mongo::COLL_QUERY_OPS.each do |m|
22
+ ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
23
+ end
24
+ Oboe::Inst::Mongo::COLL_INDEX_OPS.each do |m|
25
+ ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
26
+ end
27
+ ::Mongo::Collection.method_defined?(:oboe_collect).should == true
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oboe::Inst::Moped do
4
+ it 'Stock Moped should be loaded, defined and ready' do
5
+ defined?(::Moped).should_not == nil
6
+ defined?(::Moped::Database).should_not == nil
7
+ defined?(::Moped::Indexes).should_not == nil
8
+ defined?(::Moped::Query).should_not == nil
9
+ defined?(::Moped::Collection).should_not == nil
10
+ end
11
+
12
+ it 'Moped should have oboe methods defined' do
13
+ #::Moped::Database
14
+ Oboe::Inst::Moped::DB_OPS.each do |m|
15
+ ::Moped::Database.method_defined?("#{m}_with_oboe").should == true
16
+ end
17
+ ::Moped::Database.method_defined?(:extract_trace_details).should == true
18
+ ::Moped::Database.method_defined?(:command_with_oboe).should == true
19
+ ::Moped::Database.method_defined?(:drop_with_oboe).should == true
20
+
21
+ #::Moped::Indexes
22
+ Oboe::Inst::Moped::INDEX_OPS.each do |m|
23
+ ::Moped::Indexes.method_defined?("#{m}_with_oboe").should == true
24
+ end
25
+ ::Moped::Indexes.method_defined?(:extract_trace_details).should == true
26
+ ::Moped::Indexes.method_defined?(:create_with_oboe).should == true
27
+ ::Moped::Indexes.method_defined?(:drop_with_oboe).should == true
28
+
29
+ #::Moped::Query
30
+ Oboe::Inst::Moped::QUERY_OPS.each do |m|
31
+ ::Moped::Query.method_defined?("#{m}_with_oboe").should == true
32
+ end
33
+ ::Moped::Query.method_defined?(:extract_trace_details).should == true
34
+
35
+ #::Moped::Collection
36
+ Oboe::Inst::Moped::COLLECTION_OPS.each do |m|
37
+ ::Moped::Collection.method_defined?("#{m}_with_oboe").should == true
38
+ end
39
+ ::Moped::Collection.method_defined?(:extract_trace_details).should == true
40
+ end
41
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oboe::Inst::Resque do
4
+ it 'Stock Resque should be loaded, defined and ready' do
5
+ defined?(::Resque).should_not == nil
6
+ defined?(::Resque::Worker).should_not == nil
7
+ defined?(::Resque::Job).should_not == nil
8
+ end
9
+
10
+ it 'Resque should have oboe methods defined' do
11
+ [ :enqueue, :enqueue_to, :dequeue ].each do |m|
12
+ ::Resque.method_defined?("#{m}_with_oboe").should == true
13
+ end
14
+
15
+ ::Resque::Worker.method_defined?("perform_with_oboe").should == true
16
+ ::Resque::Job.method_defined?("fail_with_oboe").should == true
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.require(:default, :test)
5
+
6
+ RSpec.configure do |config|
7
+ config.color_enabled = true
8
+ config.formatter = 'documentation'
9
+ end
10
+
11
+ # Preload memcache-client
12
+ require 'memcache'
13
+
14
+ Oboe::Ruby.initialize
15
+
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oboe::Config do
4
+
5
+ it 'should have the correct default values' do
6
+ Oboe::Config[:verbose].should == false
7
+ Oboe::Config[:sample_rate].should == 1000000
8
+ Oboe::Config[:tracing_mode].should == "through"
9
+ Oboe::Config[:reporter_host].should == "127.0.0.1"
10
+ end
11
+
12
+ it 'should have the correct instrumentation defaults' do
13
+
14
+ instrumentation = [ :cassandra, :dalli, :nethttp, :memcached, :memcache, :mongo,
15
+ :moped, :rack, :resque, :action_controller, :action_view,
16
+ :active_record ]
17
+
18
+ # Verify the number of individual instrumentations
19
+ instrumentation.count.should == 12
20
+
21
+ instrumentation.each do |k|
22
+ Oboe::Config[k][:enabled].should == true
23
+ Oboe::Config[k][:log_args].should == true
24
+ end
25
+ end
26
+
27
+ end
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+
3
+ describe Oboe do
4
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oboe
3
3
  version: !ruby/object:Gem::Version
4
- hash: 115
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
- - 1
8
- - 4
9
- - 2
10
7
  - 2
11
- version: 1.4.2.2
8
+ - 1
9
+ - 1
10
+ version: 2.1.1
12
11
  platform: ruby
13
12
  authors:
14
13
  - Tracelytics, Inc.
@@ -16,9 +15,36 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2013-05-16 00:00:00 Z
20
- dependencies: []
21
-
18
+ date: 2013-06-27 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rake
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: rspec
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id002
22
48
  description: The oboe gem provides AppNeta instrumentation for Ruby and Ruby frameworks.
23
49
  email: contact@tracelytics.com
24
50
  executables: []
@@ -28,47 +54,70 @@ extensions:
28
54
  extra_rdoc_files:
29
55
  - LICENSE
30
56
  files:
31
- - lib/oboe.rb
32
- - lib/oboe_fu.rb
33
- - lib/method_profiling.rb
57
+ - .gitignore
58
+ - Gemfile
59
+ - Gemfile.lock
60
+ - Guardfile
61
+ - LICENSE
62
+ - README.md
63
+ - Rakefile
64
+ - ext/oboe_metal/extconf.rb
65
+ - ext/oboe_metal/noop/noop.c
66
+ - ext/oboe_metal/src/oboe.hpp
67
+ - ext/oboe_metal/src/oboe_wrap.cxx
68
+ - ext/oboe_metal/tests/test.rb
69
+ - get_version.rb
70
+ - init.rb
71
+ - install.rb
34
72
  - lib/joboe_metal.rb
35
- - lib/oboe_metal.rb
36
- - lib/oboe/config.rb
37
- - lib/oboe/version.rb
73
+ - lib/method_profiling.rb
74
+ - lib/oboe.rb
38
75
  - lib/oboe/api.rb
39
- - lib/oboe/loading.rb
40
- - lib/oboe/ruby.rb
41
- - lib/oboe/inst/cassandra.rb
42
- - lib/oboe/inst/dalli.rb
43
- - lib/oboe/inst/resque.rb
44
- - lib/oboe/inst/rack.rb
45
- - lib/oboe/inst/mongo.rb
46
- - lib/oboe/inst/memcached.rb
47
- - lib/oboe/inst/moped.rb
48
- - lib/oboe/inst/http.rb
49
- - lib/oboe/inst/memcache.rb
50
- - lib/oboe/api/logging.rb
51
76
  - lib/oboe/api/layerinit.rb
77
+ - lib/oboe/api/logging.rb
78
+ - lib/oboe/api/memcache.rb
52
79
  - lib/oboe/api/tracing.rb
53
80
  - lib/oboe/api/util.rb
54
- - lib/oboe/api/memcache.rb
81
+ - lib/oboe/config.rb
55
82
  - lib/oboe/frameworks/rails.rb
56
- - lib/oboe/frameworks/rails/inst/active_record.rb
83
+ - lib/oboe/frameworks/rails/helpers/rum/rum_ajax_header.js.erb
84
+ - lib/oboe/frameworks/rails/helpers/rum/rum_footer.js.erb
85
+ - lib/oboe/frameworks/rails/helpers/rum/rum_header.js.erb
57
86
  - lib/oboe/frameworks/rails/inst/action_controller.rb
58
87
  - lib/oboe/frameworks/rails/inst/action_view.rb
88
+ - lib/oboe/frameworks/rails/inst/active_record.rb
89
+ - lib/oboe/inst/cassandra.rb
90
+ - lib/oboe/inst/dalli.rb
91
+ - lib/oboe/inst/http.rb
92
+ - lib/oboe/inst/memcache.rb
93
+ - lib/oboe/inst/memcached.rb
94
+ - lib/oboe/inst/mongo.rb
95
+ - lib/oboe/inst/moped.rb
96
+ - lib/oboe/inst/rack.rb
97
+ - lib/oboe/inst/resque.rb
59
98
  - lib/oboe/instrumentation.rb
60
- - lib/rails/generators/oboe/templates/oboe_initializer.rb
99
+ - lib/oboe/loading.rb
100
+ - lib/oboe/logger.rb
101
+ - lib/oboe/ruby.rb
102
+ - lib/oboe/version.rb
103
+ - lib/oboe_fu.rb
104
+ - lib/oboe_metal.rb
61
105
  - lib/rails/generators/oboe/install_generator.rb
62
- - lib/oboe/frameworks/rails/helpers/rum/rum_header.js.erb
63
- - lib/oboe/frameworks/rails/helpers/rum/rum_ajax_header.js.erb
64
- - lib/oboe/frameworks/rails/helpers/rum/rum_footer.js.erb
65
- - ext/oboe_metal/noop/noop.c
66
- - ext/oboe_metal/src/oboe_wrap.cxx
67
- - ext/oboe_metal/src/oboe.hpp
68
- - install.rb
69
- - init.rb
70
- - LICENSE
71
- - ext/oboe_metal/extconf.rb
106
+ - lib/rails/generators/oboe/templates/oboe_initializer.rb
107
+ - oboe.gemspec
108
+ - oboe_fu.gemspec
109
+ - release.sh
110
+ - spec/instrumentation/cassandra_spec.rb
111
+ - spec/instrumentation/dalli_spec.rb
112
+ - spec/instrumentation/http_spec.rb
113
+ - spec/instrumentation/memcache_spec.rb
114
+ - spec/instrumentation/memcached_spec.rb
115
+ - spec/instrumentation/mongo_spec.rb
116
+ - spec/instrumentation/moped_spec.rb
117
+ - spec/instrumentation/resque_spec.rb
118
+ - spec/spec_helper.rb
119
+ - spec/support/config_spec.rb
120
+ - spec/support/oboe_spec.rb
72
121
  homepage: http://tracelytics.com
73
122
  licenses: []
74
123
 
@@ -102,5 +151,15 @@ rubygems_version: 1.8.15
102
151
  signing_key:
103
152
  specification_version: 3
104
153
  summary: Tracelytics instrumentation gem
105
- test_files: []
106
-
154
+ test_files:
155
+ - spec/support/oboe_spec.rb
156
+ - spec/support/config_spec.rb
157
+ - spec/instrumentation/mongo_spec.rb
158
+ - spec/instrumentation/moped_spec.rb
159
+ - spec/instrumentation/cassandra_spec.rb
160
+ - spec/instrumentation/http_spec.rb
161
+ - spec/instrumentation/resque_spec.rb
162
+ - spec/instrumentation/dalli_spec.rb
163
+ - spec/instrumentation/memcache_spec.rb
164
+ - spec/instrumentation/memcached_spec.rb
165
+ - spec/spec_helper.rb