promiscuous-newrelic 0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # Promiscuous New Relic Agent
2
+
3
+ New Relic instrumentation for Promiscuous
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'promiscuous-newrelic'
11
+ ```
@@ -0,0 +1 @@
1
+ require 'promiscuous/new_relic/instrumentation.rb'
@@ -0,0 +1,30 @@
1
+ require 'new_relic/agent/instrumentation/controller_instrumentation'
2
+
3
+ DependencyDetection.defer do
4
+ @name = :promiscuous
5
+
6
+ depends_on do
7
+ defined?(Promiscuous::Common::Worker) and not NewRelic::Control.instance['disable_promiscuous']
8
+ end
9
+
10
+ executes do
11
+ Promiscuous::Common::Worker.class_eval do
12
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
13
+
14
+ alias_method :unit_of_work_without_rpm, :unit_of_work
15
+ def unit_of_work(type, &block)
16
+ # XXX All the publishers are using the same category
17
+ # (Just because it's hard to make sense of what it really means
18
+ # to split things up. Maybe we should not even report the publisher worker.
19
+ worker_type = type == 'publisher' ? "Publishers" : "Subscribers"
20
+
21
+ perform_action_with_newrelic_trace(:class_name => type,
22
+ :category => "OtherTransaction/Promiscuous#{worker_type}") do
23
+ unit_of_work_without_rpm(type, &block)
24
+ end
25
+ end
26
+ end
27
+
28
+ NewRelic::Agent.logger.debug 'Using Promiscuous Instrumentation'
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ module Promiscuous
2
+ module NewRelic
3
+ VERSION = '0.1'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: promiscuous-newrelic
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Nicolas Viennot
9
+ - Kareem Kouddous
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-12-12 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: newrelic_rpm
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ - !ruby/object:Gem::Dependency
32
+ name: activesupport
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: promiscuous
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.17.0
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 0.17.0
63
+ description: NewRelic Agent for Promiscuous
64
+ email:
65
+ - nicolas@viennot.biz
66
+ - kareem@doubleonemedia.com
67
+ executables: []
68
+ extensions: []
69
+ extra_rdoc_files: []
70
+ files:
71
+ - lib/promiscuous/new_relic/version.rb
72
+ - lib/promiscuous/new_relic/instrumentation.rb
73
+ - lib/promiscuous-newrelic.rb
74
+ - README.md
75
+ homepage: http://github.com/crowdtap/promiscuous-newrelic
76
+ licenses: []
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 1.8.23
96
+ signing_key:
97
+ specification_version: 3
98
+ summary: NewRelic Agent for Promiscuous
99
+ test_files: []