newrelic_rpm 3.16.1.320 → 3.16.2.321

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec626b83799ad14fe3e3534083621d692bfbd138
4
- data.tar.gz: 0593104dbbfb3f5faa967043e7025e42991ce168
3
+ metadata.gz: d5fbd063ff6696e5f6ca06468d904efd894895f0
4
+ data.tar.gz: ce04df3458e79da8fd0dcb30d5b5c5b9163013ca
5
5
  SHA512:
6
- metadata.gz: 3caec728f33c30b9149c5c01e27d9c573562268f19cc69a06416af69634e622c25e11cb2a9267082615b063b8f3963cb62de03ab97b9d6ddfb6aa721b18d7d66
7
- data.tar.gz: 688803e2468ece921d1c4b18dd3f81bb3d7c5ddc41d6ecf0ebb24fef10db0fcfe8ca85d8f329f71a8126769e7bd6c036a9fe2234bee373eed29852dfbf71245f
6
+ metadata.gz: 728c1d9a90c3dacd41feb973c580fe65ac6be12a6373601fcd016ffe80deeb42c35ef48ebeda9db851a1e6016295ee86dfce599a2c79ef3eb7b4157a107ec88c
7
+ data.tar.gz: 7d16bb5da40a84b1ba4def5d9b7cafc82d65c0afe66b48d9b7ef6e37c1b1742c839e2b385d3ef7985ab72172c8ebb6966263837b0a29b37899a4b787ac8b78fe
data/CHANGELOG CHANGED
@@ -1,6 +1,14 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
- ## v3.16.1
3
+ ## v3.16.2 ##
4
+
5
+ * Fix for "Unexpected frame in traced method stack" errors
6
+
7
+ Our ActiveRecord 4.x instrumentation could have generated "Unexpected frame in
8
+ traced method stack" errors when used outside of an active transaction (for
9
+ example, in custom background job handlers). This has been fixed.
10
+
11
+ ## v3.16.1 ##
4
12
 
5
13
  * Internal datastore instrumentation rewrites
6
14
 
@@ -97,7 +97,9 @@ module NewRelic
97
97
  # See comment for start_segment as we continue to work around limitations of the
98
98
  # current tracer in this method.
99
99
  def finish
100
- state.traced_method_stack.push_segment state, @segment
100
+ if state.current_transaction
101
+ state.traced_method_stack.push_segment state, @segment
102
+ end
101
103
  @segment.finish
102
104
  end
103
105
 
@@ -46,6 +46,15 @@ module NewRelic
46
46
  raise NotImplementedError, "Subclasses must implement record_metrics"
47
47
  end
48
48
 
49
+ INSPECT_IGNORE = [:@transaction, :@transaction_state].freeze
50
+
51
+ def inspect
52
+ ivars = (instance_variables - INSPECT_IGNORE).inject([]) do |memo, var_name|
53
+ memo << "#{var_name}=#{instance_variable_get(var_name).inspect}"
54
+ end
55
+ sprintf('#<%s:0x%x %s>', self.class.name, object_id, ivars.join(', '))
56
+ end
57
+
49
58
  private
50
59
 
51
60
  # callback for subclasses to override
@@ -12,7 +12,7 @@ module NewRelic
12
12
 
13
13
  MAJOR = 3
14
14
  MINOR = 16
15
- TINY = 1
15
+ TINY = 2
16
16
 
17
17
  begin
18
18
  require File.join(File.dirname(__FILE__), 'build')
@@ -571,6 +571,15 @@ class ActiveRecordInstrumentationTest < Minitest::Test
571
571
  })
572
572
  end
573
573
 
574
+ def test_segment_skips_traced_method_stack_outside_txn
575
+ state = NewRelic::Agent::TransactionState.tl_get
576
+ stack = state.traced_method_stack
577
+ stack.expects(:push_segment).never
578
+
579
+ Order.create(:name => 'bob')
580
+ end
581
+
582
+
574
583
  ## helpers
575
584
 
576
585
  def adapter
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.16.1.320
4
+ version: 3.16.2.321
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Krajcar
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-08-15 00:00:00.000000000 Z
15
+ date: 2016-08-22 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake