talentbox-newrelic-sequel 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  .idea
2
2
  .DS_Store
3
3
  Gemfile.lock
4
+ *.orig
5
+ pkg
@@ -72,12 +72,12 @@ module NewRelic
72
72
 
73
73
  metrics = ["ActiveRecord/#{operation}", 'ActiveRecord/all']
74
74
  metrics.each do |metric|
75
- NewRelic::Agent.instance.stats_engine.get_stats_no_scope(metric).trace_call(duration)
75
+ NewRelic::Agent.instance.sql_sampler.notice_sql(sql, metric, nil, duration)
76
76
  end
77
77
  end
78
78
 
79
79
  def self.extract_operation_from_sql(sql)
80
- case sql
80
+ case sql[0...15]
81
81
  when /^\s*select/i then
82
82
  'find'
83
83
  when /^\s*(update|insert)/i then
@@ -120,6 +120,10 @@ DependencyDetection.defer do
120
120
  defined?(::Sequel) && defined?(::Sequel::Database)
121
121
  end
122
122
 
123
+ executes do
124
+ NewRelic::Agent.logger.debug 'Installing Sequel instrumentation'
125
+ end
126
+
123
127
  executes do
124
128
  if defined?(SequelRails)
125
129
  ActiveSupport::Notifications.subscribe("sql.sequel") do |*args|
@@ -1,3 +1,3 @@
1
1
  class NewRelicSequel
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: talentbox-newrelic-sequel
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - REA Group
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: -4563494043796374376
96
+ hash: 222738805168072993
97
97
  none: false
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: -4563494043796374376
105
+ hash: 222738805168072993
106
106
  none: false
107
107
  requirements: []
108
108
  rubyforge_project: