newrelic-infinite_tracing 7.2.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/infinite_tracing/streaming_buffer.rb +14 -14
- data/newrelic-infinite_tracing.gemspec +1 -1
- data/tasks/all.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 445f6703f6c422340754fe7755d5fc696516b284cb8b124939d7b12df33ab41d
|
4
|
+
data.tar.gz: ca2877a86b3aa2324088040c16d0fa9ac364ca4d6c569f192560d717d6dc661e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344090f0535457f3b195513bc4cdce46ca29a020e8212239ee394f28429f6d55ecb3a977d2ee6b86b06f5b74278e5c5996b71edb7159e53c10ef048646c7e59b
|
7
|
+
data.tar.gz: 7151ccfacb0587b65cde6fedb0a288b891950ad7011938e9e068ecd37dc317c3ab82685e6cd5f18496fa829d681dfcb918baacdcb889d6662574601f41ba2026
|
@@ -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 =
|
79
|
-
until @queue.empty? ||
|
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", "
|
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
|
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:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Huntsman
|
8
8
|
- Tanna McClure
|
9
|
-
-
|
9
|
+
- Kayla Reopelle
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-09-22 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:
|
21
|
+
version: 8.0.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:
|
28
|
+
version: 8.0.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: grpc
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|