newrelic-infinite_tracing 7.0.0 → 8.1.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: 0c0cb119fdd9c9388989d99d116add07d20eeeaaab5f0b8e3bc533c4be9f750c
4
- data.tar.gz: 925054cff0d639af379cecdaa726230221fe0a5d41def09a86f8e0455c0089e2
3
+ metadata.gz: 44cf9ca54ac0bbec2f93528511ffe84f20af38f2e7669d32fc20266fdef48188
4
+ data.tar.gz: dc92c94c41a933517de28de773d2ad1c6e41d7daae94744dae89e6c655e2d188
5
5
  SHA512:
6
- metadata.gz: 373451194aa1a8c8738582a74a2ffa7d10d9c2b0fc7110951caf68d90ed0465794d3835491c71dbb789b080f717b0eed6fc51a3c3530dcd05568e05d1f091266
7
- data.tar.gz: 7f4a47aac1e4b26e600985e2abeadbf18f0f11c6ca38cf9a4b2422f21995fbe3a9f7193ca544ac4aa19efa548017f9aa7fc0c9396ed0e3b569cb17a4600429db
6
+ metadata.gz: a4662c4ecf8cfec9e7b5374968e05d73ce86b2fc9317d489e287018d559509d46a200b191a42e559b983f8857c014b488beed3daea9ee8655a5044489b767a1b
7
+ data.tar.gz: 14bedf21c79b2d9e069172da926bd1bbc492042fa23346fe7d6bcf75e74bcda88e6c286a6a15c15605e5fe756c1b33180762a463aa8185743cffa88103ad5a3a
@@ -15,11 +15,11 @@ module NewRelic::Agent
15
15
  include Enumerable
16
16
  extend Forwardable
17
17
  def_delegators :@queue, :empty?, :num_waiting, :push
18
-
18
+
19
19
  DEFAULT_QUEUE_SIZE = 10_000
20
20
  FLUSH_DELAY = 0.005
21
21
  MAX_FLUSH_WAIT = 3 # three seconds
22
-
22
+
23
23
  attr_reader :queue
24
24
 
25
25
  def initialize max_size = DEFAULT_QUEUE_SIZE
@@ -29,7 +29,7 @@ module NewRelic::Agent
29
29
  @batch = Array.new
30
30
  end
31
31
 
32
- # Dumps the contents of this streaming buffer onto
32
+ # Dumps the contents of this streaming buffer onto
33
33
  # the given buffer and closes the queue
34
34
  def transfer new_buffer
35
35
  @lock.synchronize do
@@ -67,7 +67,7 @@ module NewRelic::Agent
67
67
  @queue.num_waiting.times { @queue.push nil }
68
68
  close_queue
69
69
 
70
- # Logs if we're throwing away spans because nothing's
70
+ # Logs if we're throwing away spans because nothing's
71
71
  # waiting to take them off the queue.
72
72
  if @queue.num_waiting == 0 && !@queue.empty?
73
73
  NewRelic::Agent.logger.warn "Discarding #{@queue.size} segments on Streaming Buffer"
@@ -75,8 +75,8 @@ module NewRelic::Agent
75
75
  end
76
76
 
77
77
  # Only wait a short while for queue to flush
78
- cutoff = Time.now + MAX_FLUSH_WAIT
79
- until @queue.empty? || Time.now >= cutoff do sleep(FLUSH_DELAY) end
78
+ cutoff = Process.clock_gettime(Process::CLOCK_MONOTONIC) + MAX_FLUSH_WAIT
79
+ until @queue.empty? || Process.clock_gettime(Process::CLOCK_MONOTONIC) >= cutoff do sleep(FLUSH_DELAY) end
80
80
  end
81
81
 
82
82
  def close_queue
@@ -87,9 +87,9 @@ module NewRelic::Agent
87
87
  # items off the queue while any items are present
88
88
  # If +nil+ is popped, the queue is closing.
89
89
  #
90
- # The segment is transformed into a serializable
90
+ # The segment is transformed into a serializable
91
91
  # span here so processing is taking place within
92
- # the gRPC call's thread rather than in the main
92
+ # the gRPC call's thread rather than in the main
93
93
  # application thread.
94
94
  def enumerator
95
95
  return enum_for(:enumerator) unless block_given?
@@ -106,16 +106,16 @@ module NewRelic::Agent
106
106
 
107
107
  # Returns the blocking enumerator that will pop
108
108
  # items off the queue while any items are present
109
- #
110
- # yielding is deferred until batch_size spans is
109
+ #
110
+ # yielding is deferred until batch_size spans is
111
111
  # reached.
112
112
  #
113
- # If +nil+ is popped, the queue is closing. A
113
+ # If +nil+ is popped, the queue is closing. A
114
114
  # final yield on non-empty batch is fired.
115
115
  #
116
- # The segment is transformed into a serializable
116
+ # The segment is transformed into a serializable
117
117
  # span here so processing is taking place within
118
- # the gRPC call's thread rather than in the main
118
+ # the gRPC call's thread rather than in the main
119
119
  # application thread.
120
120
  def batch_enumerator
121
121
  return enum_for(:enumerator) unless block_given?
@@ -139,7 +139,7 @@ module NewRelic::Agent
139
139
 
140
140
  def span_event proc_or_segment
141
141
  if proc_or_segment.is_a?(Proc)
142
- proc_or_segment.call
142
+ proc_or_segment.call
143
143
  else
144
144
  SpanEventPrimitive.for_segment(proc_or_segment)
145
145
  end
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
  s.version = NewRelic::VERSION::STRING
35
35
  s.required_ruby_version = '>= 2.5.0'
36
36
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
37
- s.authors = [ "Aaron Huntsman", "Tanna McClure", "Michael Lang" ]
37
+ s.authors = [ "Aaron Huntsman", "Tanna McClure", "Kayla Reopelle" ]
38
38
  s.date = Time.now.strftime('%Y-%m-%d')
39
39
  s.licenses = ['Apache-2.0']
40
40
  s.description = <<-EOS
data/tasks/all.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # This file is distributed under New Relic's license terms.
3
3
  # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
4
 
5
- # This is required to load in task definitions from merb
5
+ # This is required to load in task definitions
6
6
  Dir.glob(File.join(File.dirname(__FILE__),'*.rake')) do |file|
7
7
  load file
8
8
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-infinite_tracing
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Huntsman
8
8
  - Tanna McClure
9
- - Michael Lang
9
+ - Kayla Reopelle
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-04-23 00:00:00.000000000 Z
13
+ date: 2021-10-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: newrelic_rpm
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 7.0.0
21
+ version: 8.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 7.0.0
28
+ version: 8.1.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: grpc
31
31
  requirement: !ruby/object:Gem::Requirement