scout_rails 1.0.4 → 1.0.5.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,9 @@
1
+ # 1.0.5.pre
2
+
3
+ * Removing duplicate Enviornment#unicorn? method
4
+ * Removing logging when not instrumenting unscoped method (confusing - looks like an error)
5
+ * Recording ActiveRecord exists queries as MODEL#exists vs. SQL#UNKNOWN
6
+
1
7
  # 1.0.4
2
8
 
3
9
  * Added Mongo + Moped instrumentation. Mongo is used for Mongoid < 3.
@@ -70,14 +70,6 @@ module ScoutRails
70
70
  end
71
71
  end
72
72
 
73
- def unicorn?
74
- if defined?(::Unicorn) && defined?(::Unicorn::HttpServer)
75
- # Ensure Unicorn is actually initialized. It could just be required and not running.
76
- ObjectSpace.each_object(::Unicorn::HttpServer) { |x| return true }
77
- false
78
- end
79
- end
80
-
81
73
  # Called via +#forking?+ since Passenger forks. Adds an event listener to start the worker thread
82
74
  # inside the passenger worker process.
83
75
  # Background: http://www.modrails.com/documentation/Users%20guide%20Nginx.html#spawning%5Fmethods%5Fexplained
@@ -91,7 +83,7 @@ module ScoutRails
91
83
 
92
84
  def unicorn?
93
85
  if defined?(::Unicorn) && defined?(::Unicorn::HttpServer)
94
- # ensure Unicorn is actually initialized.
86
+ # Ensure Unicorn is actually initialized. It could just be required and not running.
95
87
  ObjectSpace.each_object(::Unicorn::HttpServer) { |x| return true }
96
88
  end
97
89
  end
@@ -21,13 +21,15 @@ module ScoutRails::Instruments
21
21
  end
22
22
 
23
23
  def scout_ar_metric_name(sql,name)
24
+ # sql: SELECT "places".* FROM "places" ORDER BY "places"."position" ASC
25
+ # name: Place Load
24
26
  if name && (parts = name.split " ") && parts.size == 2
25
27
  model = parts.first
26
28
  operation = parts.last.downcase
27
29
  metric_name = case operation
28
30
  when 'load' then 'find'
29
31
  when 'indexes', 'columns' then nil # not under developer control
30
- when 'destroy', 'find', 'save', 'create' then operation
32
+ when 'destroy', 'find', 'save', 'create', 'exists' then operation
31
33
  when 'update' then 'save'
32
34
  else
33
35
  if model == 'Join'
@@ -29,7 +29,6 @@ module ScoutRails::Tracer
29
29
  def instrument(metric_name, options={}, &block)
30
30
  # don't instrument if (1) NOT inside a transaction and (2) NOT a Controller metric.
31
31
  if !Thread::current[:scout_scope_name] and metric_name !~ /\AController\//
32
- ScoutRails::Agent.instance.logger.debug "Not instrumenting [#{metric_name}] - no scope."
33
32
  return yield
34
33
  end
35
34
  if options.delete(:scope)
@@ -1,3 +1,3 @@
1
1
  module ScoutRails
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5.pre"
3
3
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
5
- prerelease:
4
+ version: 1.0.5.pre
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Derek Haynes
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-26 00:00:00.000000000 Z
13
+ date: 2012-10-16 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Monitors a Ruby on Rails application and reports detailed metrics on
16
16
  performance to Scout, a hosted monitoring service.
@@ -64,9 +64,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ! '>='
67
+ - - ! '>'
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: 1.3.1
70
70
  requirements: []
71
71
  rubyforge_project: scout_rails
72
72
  rubygems_version: 1.8.10