wireframe-rpm_contrib 1.0.12.7 → 2.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/CHANGELOG +69 -3
  2. data/Gemfile +13 -0
  3. data/README.md +137 -14
  4. data/Rakefile +5 -3
  5. data/lib/rpm_contrib.rb +17 -24
  6. data/lib/rpm_contrib/agent_compatibility.rb +11 -0
  7. data/lib/rpm_contrib/detection.rb +5 -0
  8. data/lib/rpm_contrib/detection/camping.rb +1 -1
  9. data/lib/rpm_contrib/instrumentation.rb +16 -0
  10. data/lib/rpm_contrib/instrumentation/active_messaging.rb +22 -0
  11. data/lib/rpm_contrib/instrumentation/aws.rb +68 -0
  12. data/lib/rpm_contrib/instrumentation/camping.rb +7 -10
  13. data/lib/rpm_contrib/instrumentation/cassandra.rb +26 -19
  14. data/lib/rpm_contrib/instrumentation/crack.rb +41 -0
  15. data/lib/rpm_contrib/instrumentation/curb.rb +52 -0
  16. data/lib/rpm_contrib/instrumentation/elastic_search.rb +26 -0
  17. data/lib/rpm_contrib/instrumentation/kyototycoon.rb +28 -0
  18. data/lib/rpm_contrib/instrumentation/mongo.rb +54 -0
  19. data/lib/rpm_contrib/instrumentation/mongoid.rb +12 -44
  20. data/lib/rpm_contrib/instrumentation/paperclip.rb +25 -18
  21. data/lib/rpm_contrib/instrumentation/picky.rb +41 -0
  22. data/lib/rpm_contrib/instrumentation/redis.rb +29 -20
  23. data/lib/rpm_contrib/instrumentation/resque.rb +78 -42
  24. data/lib/rpm_contrib/instrumentation/riak_client.rb +48 -0
  25. data/lib/rpm_contrib/instrumentation/ripple.rb +37 -0
  26. data/lib/rpm_contrib/instrumentation/sinatra.rb +30 -0
  27. data/lib/rpm_contrib/instrumentation/thinking_sphinx.rb +22 -0
  28. data/lib/rpm_contrib/instrumentation/typhoeus.rb +33 -0
  29. data/lib/rpm_contrib/instrumentation/ultrasphinx.rb +22 -0
  30. data/lib/rpm_contrib/instrumentation/workling.rb +27 -0
  31. data/lib/rpm_contrib/instrumentation/yajl.rb +41 -0
  32. data/lib/rpm_contrib/language_support.rb +31 -0
  33. data/lib/rpm_contrib/samplers.rb +17 -0
  34. data/test/helper.rb +1 -1
  35. data/test/schema.rb +1 -1
  36. data/test/test_curb.rb +69 -0
  37. data/test/test_picky.rb +55 -0
  38. data/test/test_redis.rb +2 -2
  39. data/test/test_resque.rb +74 -0
  40. data/test/{test_mongoid.rb → test_workling.rb} +6 -14
  41. metadata +74 -64
  42. data/lib/rpm_contrib/detection/resque.rb +0 -15
  43. data/lib/rpm_contrib/instrumentation/aws/s3.rb +0 -56
  44. data/lib/rpm_contrib/instrumentation/mongo_mapper.rb +0 -44
@@ -1,15 +0,0 @@
1
- # Detect when running under camping and set the framework and dispatcher.
2
-
3
- module NewRelic
4
- class LocalEnvironment
5
- module Resque
6
- def discover_dispatcher
7
- super
8
- if defined?(::Resque::Worker) && @dispatcher.nil?
9
- @dispatcher = 'resque'
10
- end
11
- end
12
- end
13
- end
14
- end
15
-
@@ -1,56 +0,0 @@
1
- # Instrumentation for the AWS-S3 gem for New Relic RPM by Brian Doll
2
- if defined?(::AWS::S3) && !NewRelic::Control.instance['disable_aws-s3']
3
-
4
- # Instrument connections to the AWS-S3 service
5
- ::AWS::S3::Connection::Management::ClassMethods.module_eval do
6
- add_method_tracer :establish_connection!, 'AWS-S3/establish_connection!'
7
- end
8
-
9
- # Instrument methods on Bucket
10
- ::AWS::S3::Bucket.instance_eval do
11
- class << self
12
- add_method_tracer :create, 'AWS-S3/Bucket/create'
13
- add_method_tracer :find, 'AWS-S3/Bucket/find'
14
- add_method_tracer :objects, 'AWS-S3/Bucket/objects'
15
- add_method_tracer :delete, 'AWS-S3/Bucket/delete'
16
- add_method_tracer :list, 'AWS-S3/Bucket/list'
17
- end
18
- end
19
-
20
- # Instrument methods on Bucket instances
21
- ::AWS::S3::Bucket.class_eval do
22
- add_method_tracer :[], 'AWS-S3/Bucket/#{self.name}/[]'
23
- add_method_tracer :new_object,'AWS-S3/Bucket/#{self.name}/new_objects'
24
- add_method_tracer :objects, 'AWS-S3/Bucket/#{self.name}/objects'
25
- add_method_tracer :delete, 'AWS-S3/Bucket/#{self.name}/delete'
26
- add_method_tracer :delete_all,'AWS-S3/Bucket/#{self.name}/delete_all'
27
- add_method_tracer :update, 'AWS-S3/Bucket/#{self.name}/update'
28
- end
29
-
30
- # Instrument methods on S3Object
31
- ::AWS::S3::S3Object.instance_eval do
32
- class << self
33
- add_method_tracer :about, 'AWS-S3/S3Object/about'
34
- add_method_tracer :copy, 'AWS-S3/S3Object/copy'
35
- add_method_tracer :delete, 'AWS-S3/S3Object/delete'
36
- add_method_tracer :rename, 'AWS-S3/S3Object/rename'
37
- add_method_tracer :store, 'AWS-S3/S3Object/store'
38
- end
39
- end
40
-
41
- # Instrument methods on S3Object instances
42
- # Metric names are aggregated across all S3Objects since having a metric for
43
- # every single S3Object instance and method pair would be fairly useless
44
- ::AWS::S3::S3Object.class_eval do
45
- add_method_tracer :value, 'AWS-S3/S3Objects/value'
46
- add_method_tracer :about, 'AWS-S3/S3Objects/about'
47
- add_method_tracer :metadata, 'AWS-S3/S3Objects/metadata'
48
- add_method_tracer :store, 'AWS-S3/S3Objects/store'
49
- add_method_tracer :delete, 'AWS-S3/S3Objects/delete'
50
- add_method_tracer :copy, 'AWS-S3/S3Objects/copy'
51
- add_method_tracer :rename, 'AWS-S3/S3Objects/rename'
52
- add_method_tracer :etag, 'AWS-S3/S3Objects/etag'
53
- add_method_tracer :owner, 'AWS-S3/S3Objects/owner'
54
- end
55
-
56
- end
@@ -1,44 +0,0 @@
1
- if defined?(::MongoMapper) && !NewRelic::Control.instance['disable_mongodb']
2
-
3
- module RPMContrib::Instrumentation
4
- # Just drop this little diddy in your app to get some (not perfect) information
5
- # on query times and such.
6
- #
7
- # Currently only MongoMapper is implemented
8
- module MongoMapper
9
- def self.included(model)
10
- model.metaclass.class_eval do
11
- add_method_tracer :find, 'Database/#{self.name}/find'
12
- add_method_tracer :find!, 'Database/#{self.name}/find!'
13
- add_method_tracer :paginate, 'Database/#{self.name}/paginate'
14
- add_method_tracer :first, 'Database/#{self.name}/first'
15
- add_method_tracer :last, 'Database/#{self.name}/last'
16
- add_method_tracer :all, 'Database/#{self.name}/all'
17
- add_method_tracer :count, 'Database/#{self.name}/count'
18
- add_method_tracer :create, 'Database/#{self.name}/create'
19
- add_method_tracer :create!, 'Database/#{self.name}/create!'
20
- add_method_tracer :update, 'Database/#{self.name}/update'
21
- add_method_tracer :delete, 'Database/#{self.name}/delete'
22
- add_method_tracer :delete_all, 'Database/#{self.name}/delete_all'
23
- add_method_tracer :destroy, 'Database/#{self.name}/destroy'
24
- add_method_tracer :destroy_all, 'Database/#{self.name}/destroy_all'
25
- add_method_tracer :exists?, 'Database/#{self.name}/exists?'
26
- add_method_tracer :find_by_id, 'Database/#{self.name}/find_by_id'
27
- add_method_tracer :increment, 'Database/#{self.name}/increment'
28
- add_method_tracer :decrement, 'Database/#{self.name}/decrement'
29
- add_method_tracer :set, 'Database/#{self.name}/set'
30
- add_method_tracer :push, 'Database/#{self.name}/push'
31
- add_method_tracer :push_all, 'Database/#{self.name}/push_all'
32
- add_method_tracer :push_uniq, 'Database/#{self.name}/push_uniq'
33
- add_method_tracer :pull, 'Database/#{self.name}/pull'
34
- add_method_tracer :pull_all, 'Database/#{self.name}/pull_all'
35
- end
36
-
37
- model.class_eval do
38
- add_method_tracer :save, 'Database/#{self.class.name}/save'
39
- end
40
- end
41
- end
42
- ::MongoMapper::Document.append_inclusions(::RPMContrib::Instrumentation::MongoMapper)
43
- end
44
- end