newrelic-infinite_tracing 8.6.0 → 8.9.0

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
  SHA256:
3
- metadata.gz: 95214bedd72e2f7c1e37e4327bedcee0b0de72d3ab78ccbb9c3a60da6d446eca
4
- data.tar.gz: b32d6d9b9b2fae552c9595e74b8f897a298aec5b693e141fd0216b766376cbd7
3
+ metadata.gz: e6712a9c3ffb94789cc17ccdcce33735ba3afdfd6bab87b2e03e98f54eba7f1c
4
+ data.tar.gz: b9e852c742440d75b8c89ba20cd49a92164ead327ddedbeedeefdff674970282
5
5
  SHA512:
6
- metadata.gz: c6d5c64d406332ea6e1ae327436d9530f3fa26347d2cf128b821213890dfe262abeb3eeee1d24401b0d473f65dccabd5849afcd6cfc85b09ca4418c659e57517
7
- data.tar.gz: 8bb52d97a0325ab1957dca4125e756921c5cea8d28cb2b7e11985cdd46526a179079c39faf137140ed8b4567439e1099e278d08049b49abe9234bb4d6efca021
6
+ metadata.gz: a9cca5b997416ec8b89e45c7833b185429343ce89e899eddcf1620316aaa09a51258c2b505c49cf4b6f69f8ee7daab596edb5dcdb3965bc9a0ee7efc0fce944a
7
+ data.tar.gz: 3197dc1c5cf9c01631b7a7499fa70b74e218b52c70302f85a03dbc39317feb47122e79331c6575df22ac181b5a84a38aee01374b39ed176e4e876bbbe0b3715a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # New Relic Infinite Tracing for Ruby Agent Release Notes #
2
2
 
3
+ ## v8.9.0
4
+
5
+ * **Bugfix: Infinite Tracing hung on connection restart**
6
+
7
+ Previously, when using infinite tracing, the agent would intermittently encounter a deadlock when attempting to restart the infinite tracing connection. This bug would prevent the agent from sending all data types, including non-infinite-tracing-related data. This change reworks how we restart infinite tracing to prevent potential deadlocks.
8
+
3
9
  ## v7.0.0
4
10
  * Bugfix: Fixes an intermittent bug where the agent was unable to start when infinite tracing was enabled.
5
11
 
@@ -18,7 +18,21 @@ module NewRelic::Agent
18
18
  end
19
19
  end
20
20
 
21
+ # Handles the case where the server tells us to restart -
22
+ # this clears the data, clears connection attempts, and
23
+ # waits a while to reconnect.
24
+ def handle_force_restart(error)
25
+ ::NewRelic::Agent.logger.debug error.message
26
+ drop_buffered_data
27
+ @service.force_restart if @service
28
+ @connect_state = :pending
29
+ close_infinite_tracer
30
+ sleep 30
31
+ end
32
+
33
+ # Whenever we reconnect, close and restart
21
34
  def close_infinite_tracer
35
+ NewRelic::Agent.logger.debug "Closing infinite tracer threads"
22
36
  return unless @infinite_tracer_thread
23
37
  @infinite_tracer_thread.join
24
38
  @infinite_tracer_thread.stop
@@ -20,12 +20,8 @@ module NewRelic::Agent
20
20
  end
21
21
 
22
22
  def credentials
23
- if Config.local?
24
- :this_channel_is_insecure
25
- else
26
- # Uses system configured certificates by default
27
- GRPC::Core::ChannelCredentials.new
28
- end
23
+ # Uses system configured certificates by default
24
+ GRPC::Core::ChannelCredentials.new
29
25
  end
30
26
 
31
27
  def host_and_port
@@ -52,7 +52,7 @@ module NewRelic::Agent
52
52
  # Turns camelcase base class name into upper snake case version of the name.
53
53
  def formatted_class_name class_name
54
54
  class_name = class_name.split(":")[-1]
55
- formatted_class_name = (class_name.gsub!(/(.)([A-Z])/, '\1_\2') || class_name).upcase
55
+ (class_name.gsub!(/(.)([A-Z])/, '\1_\2') || class_name).upcase
56
56
  end
57
57
 
58
58
  # Literal codes are all mapped to unique class names, so we can deduce the
@@ -114,7 +114,6 @@ module NewRelic::Agent
114
114
  @agent_connected = true
115
115
  @agent_started.signal
116
116
  end
117
- @active_clients.each_value(&:restart)
118
117
  end
119
118
 
120
119
  private
@@ -43,8 +43,7 @@ module NewRelic::Agent
43
43
  begin
44
44
  [key, AttributeValue.new(safe_param_name(value) => value)]
45
45
  rescue => e
46
- puts e.inspect
47
- puts [key, value].inspect
46
+ NewRelic::Agent.logger.debug("Infinite tracing transformer error: #{e.inspect}")
48
47
  nil
49
48
  end
50
49
  end.to_h
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.version = NewRelic::VERSION::STRING
34
34
  s.required_ruby_version = '>= 2.5.0'
35
35
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
36
- s.authors = ["Tanna McClure", "Kayla Reopelle", "James Bunch"]
36
+ s.authors = ["Tanna McClure", "Kayla Reopelle", "James Bunch", "Hannah Ramadan"]
37
37
  s.licenses = ['Apache-2.0']
38
38
  s.description = <<-EOS
39
39
  The New Relic Ruby agent requires the gem newrelic_rpm, and it includes distributed
@@ -70,7 +70,6 @@ Gem or plugin, hosted on https://github.com/newrelic/newrelic-ruby-agent/
70
70
 
71
71
  s.homepage = "https://github.com/newrelic/newrelic-ruby-agent/tree/main/infinite_tracing"
72
72
  s.require_paths = ["lib", "infinite_tracing"]
73
- s.rubygems_version = Gem::VERSION
74
73
  s.summary = "New Relic Infinite Tracing for the Ruby agent"
75
74
 
76
75
  s.add_dependency 'newrelic_rpm', NewRelic::VERSION::STRING
@@ -85,8 +84,8 @@ Gem or plugin, hosted on https://github.com/newrelic/newrelic-ruby-agent/
85
84
  s.add_development_dependency 'pry-stack_explorer', '~> 0.4.9'
86
85
  s.add_development_dependency 'guard', '~> 2.16.0'
87
86
  s.add_development_dependency 'guard-minitest', '~> 2.4.0'
88
- s.add_development_dependency 'hometown', '~> 0.2.5'
89
87
  s.add_development_dependency 'bundler'
88
+ s.add_development_dependency 'simplecov'
90
89
 
91
90
  s.add_development_dependency 'grpc-tools', "~> 1.14"
92
91
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-infinite_tracing
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.6.0
4
+ version: 8.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
8
8
  - Kayla Reopelle
9
9
  - James Bunch
10
+ - Hannah Ramadan
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2022-04-04 00:00:00.000000000 Z
14
+ date: 2022-07-11 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: newrelic_rpm
@@ -18,14 +19,14 @@ dependencies:
18
19
  requirements:
19
20
  - - '='
20
21
  - !ruby/object:Gem::Version
21
- version: 8.6.0
22
+ version: 8.9.0
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
26
  requirements:
26
27
  - - '='
27
28
  - !ruby/object:Gem::Version
28
- version: 8.6.0
29
+ version: 8.9.0
29
30
  - !ruby/object:Gem::Dependency
30
31
  name: grpc
31
32
  requirement: !ruby/object:Gem::Requirement
@@ -167,21 +168,21 @@ dependencies:
167
168
  - !ruby/object:Gem::Version
168
169
  version: 2.4.0
169
170
  - !ruby/object:Gem::Dependency
170
- name: hometown
171
+ name: bundler
171
172
  requirement: !ruby/object:Gem::Requirement
172
173
  requirements:
173
- - - "~>"
174
+ - - ">="
174
175
  - !ruby/object:Gem::Version
175
- version: 0.2.5
176
+ version: '0'
176
177
  type: :development
177
178
  prerelease: false
178
179
  version_requirements: !ruby/object:Gem::Requirement
179
180
  requirements:
180
- - - "~>"
181
+ - - ">="
181
182
  - !ruby/object:Gem::Version
182
- version: 0.2.5
183
+ version: '0'
183
184
  - !ruby/object:Gem::Dependency
184
- name: bundler
185
+ name: simplecov
185
186
  requirement: !ruby/object:Gem::Requirement
186
187
  requirements:
187
188
  - - ">="