newrelic-infinite_tracing 7.1.0 → 8.2.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/agent_integrations/datastore_segment.rb +3 -0
- data/lib/infinite_tracing/agent_integrations/external_request_segment.rb +3 -0
- data/lib/infinite_tracing/agent_integrations/segment.rb +3 -0
- 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: 8a0b632dc4c2f6408a540026f4e17f50d4a663836cf4555c14f0b4ad05c46f1d
|
4
|
+
data.tar.gz: 24ac4186c322f9eff191ce11570b720031a13e134b2b0cc13bb3cf7881fc03c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ca3ae481be72963a908527b50edbe1b0d20c553f8c0f4acc6c2577d5dbca7fea06a7156df59ecc39190b0bbef2dfa0f254aeb47253c7bf1dfa77b8b6ad812df
|
7
|
+
data.tar.gz: 51d3cfc6a93d0d7f927eef9b639ba6cae979e80fea7136b04918f34d1ed01c8be0f1d4d74db5644bee013403aa17962ba98414f86198c828c91761014a4a1709
|
@@ -8,6 +8,9 @@ module NewRelic
|
|
8
8
|
class Transaction
|
9
9
|
class DatastoreSegment
|
10
10
|
def record_span_event
|
11
|
+
# don't record a span event if the transaction is ignored
|
12
|
+
return if transaction.ignore?
|
13
|
+
|
11
14
|
tracer = ::NewRelic::Agent.agent.infinite_tracer
|
12
15
|
tracer << Proc.new { SpanEventPrimitive.for_datastore_segment self }
|
13
16
|
end
|
@@ -8,6 +8,9 @@ module NewRelic
|
|
8
8
|
class Transaction
|
9
9
|
class ExternalRequestSegment
|
10
10
|
def record_span_event
|
11
|
+
# don't record a span event if the transaction is ignored
|
12
|
+
return if transaction.ignore?
|
13
|
+
|
11
14
|
tracer = ::NewRelic::Agent.agent.infinite_tracer
|
12
15
|
tracer << Proc.new { SpanEventPrimitive.for_external_request_segment self }
|
13
16
|
end
|
@@ -13,6 +13,9 @@ module NewRelic
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def record_span_event
|
16
|
+
# don't record a span event if the transaction is ignored
|
17
|
+
return if transaction.ignore?
|
18
|
+
|
16
19
|
tracer = ::NewRelic::Agent.agent.infinite_tracer
|
17
20
|
tracer << Proc.new { SpanEventPrimitive.for_segment self }
|
18
21
|
end
|
@@ -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.2.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-11-29 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.2.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.2.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: grpc
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|