newrelic-middleware 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -2
- data/lib/newrelic-middleware/railtie.rb +23 -0
- data/lib/newrelic-middleware/version.rb +1 -1
- data/newrelic-middleware.gemspec +2 -0
- data/test/test_helper.rb +0 -3
- metadata +19 -8
data/README.md
CHANGED
@@ -1,7 +1,30 @@
|
|
1
|
+
require 'newrelic_rpm'
|
2
|
+
require 'new_relic/agent/method_tracer'
|
3
|
+
|
1
4
|
module NewRelicMiddleware
|
2
5
|
class Engine < ::Rails::Engine
|
3
6
|
initializer "newrelic.middleware-tracking" do |app|
|
4
7
|
app.config.middleware.insert 0, TrackingSupport
|
5
8
|
end
|
9
|
+
|
10
|
+
config.after_initialize do |app|
|
11
|
+
app.config.middleware.each do |m|
|
12
|
+
klass = m.klass
|
13
|
+
|
14
|
+
if klass.respond_to? :call
|
15
|
+
klass.class_eval do
|
16
|
+
extend NewRelic::Agent::MethodTracer
|
17
|
+
|
18
|
+
add_method_tracer :call, "Middleware/#{klass}"
|
19
|
+
end
|
20
|
+
else
|
21
|
+
klass.class_eval do
|
22
|
+
include NewRelic::Agent::MethodTracer
|
23
|
+
|
24
|
+
add_method_tracer :call, "Middleware/#{klass}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
6
29
|
end
|
7
30
|
end
|
data/newrelic-middleware.gemspec
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic-middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: newrelic_rpm
|
16
|
+
requirement: &70249575653620 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70249575653620
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: rails
|
16
|
-
requirement: &
|
27
|
+
requirement: &70249575653200 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ! '>='
|
@@ -21,10 +32,10 @@ dependencies:
|
|
21
32
|
version: '0'
|
22
33
|
type: :development
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *70249575653200
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rack-test
|
27
|
-
requirement: &
|
38
|
+
requirement: &70249575652780 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,7 +43,7 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70249575652780
|
36
47
|
description: Track time spent your middleware stack with New Relic
|
37
48
|
email:
|
38
49
|
- me@broadcastingadam.com
|
@@ -66,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
77
|
version: '0'
|
67
78
|
segments:
|
68
79
|
- 0
|
69
|
-
hash:
|
80
|
+
hash: -4148351062161272907
|
70
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
82
|
none: false
|
72
83
|
requirements:
|
@@ -75,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
86
|
version: '0'
|
76
87
|
segments:
|
77
88
|
- 0
|
78
|
-
hash:
|
89
|
+
hash: -4148351062161272907
|
79
90
|
requirements: []
|
80
91
|
rubyforge_project:
|
81
92
|
rubygems_version: 1.8.11
|