instana 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/instana/instrumentation/aws_sdk_sqs.rb +1 -1
- data/lib/instana/instrumentation/grpc.rb +4 -4
- data/lib/instana/instrumentation/mongo.rb +1 -1
- data/lib/instana/instrumentation/net-http.rb +1 -1
- data/lib/instana/instrumentation/rack.rb +1 -1
- data/lib/instana/instrumentation/sidekiq-client.rb +1 -1
- data/lib/instana/instrumentation/sidekiq-worker.rb +1 -1
- data/lib/instana/trace/span.rb +7 -5
- data/lib/instana/trace/tracer.rb +9 -9
- data/lib/instana/trace.rb +1 -1
- data/lib/instana/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8cd4b0e98fe6e6e7314e25e8632fd6cf148727a9fc5b411006cab2b990b037f
|
|
4
|
+
data.tar.gz: d13279637479775cc232484244f7925185e6dc9b4d52e7f0958e5a28fb463917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5610b490b1f2b4499eb78b94dbf02e2bae0247ae7efeb17207a97f68f82352d320d016e8753df3ea8f3a09c70e8eac6725c9b981eab658877f1ddee6d666a550
|
|
7
|
+
data.tar.gz: 9d5f1f0511c4ee11fe3e32c35f70caa51b0c29aefa8dd5f0149ea305dc0d5df15d57e60db80a3f90f7951a38cdae292dbebf9e16225c408c87841274197a6b27
|
|
@@ -35,11 +35,11 @@ module Instana
|
|
|
35
35
|
super(method, *others, **options)
|
|
36
36
|
rescue => e
|
|
37
37
|
kvs[:rpc][:error] = true
|
|
38
|
-
current_span.
|
|
38
|
+
current_span.add_attributes(kvs)
|
|
39
39
|
current_span.record_exception(e)
|
|
40
40
|
raise
|
|
41
41
|
ensure
|
|
42
|
-
current_span
|
|
42
|
+
current_span&.finish
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -79,11 +79,11 @@ module Instana
|
|
|
79
79
|
super(active_call, mth, *others)
|
|
80
80
|
rescue => e
|
|
81
81
|
kvs[:rpc][:error] = true
|
|
82
|
-
current_span.
|
|
82
|
+
current_span.add_attributes(kvs)
|
|
83
83
|
current_span.record_exception(e)
|
|
84
84
|
raise
|
|
85
85
|
ensure
|
|
86
|
-
current_span
|
|
86
|
+
current_span&.finish
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
end
|
|
@@ -122,7 +122,7 @@ module Instana
|
|
|
122
122
|
|
|
123
123
|
def finalize_trace(current_span, kvs, headers, trace_context)
|
|
124
124
|
set_response_headers(headers, trace_context) if headers
|
|
125
|
-
current_span.
|
|
125
|
+
current_span.add_attributes(kvs)
|
|
126
126
|
OpenTelemetry::Context.detach(@trace_token) if @trace_token
|
|
127
127
|
current_span.finish
|
|
128
128
|
end
|
data/lib/instana/trace/span.rb
CHANGED
|
@@ -67,7 +67,7 @@ module Instana
|
|
|
67
67
|
else
|
|
68
68
|
configure_custom(name)
|
|
69
69
|
end
|
|
70
|
-
|
|
70
|
+
add_attributes(attributes)
|
|
71
71
|
::Instana.processor.on_start(self)
|
|
72
72
|
# Attach a backtrace to all exit spans
|
|
73
73
|
add_stack if should_collect_stack_trace?
|
|
@@ -450,8 +450,7 @@ module Instana
|
|
|
450
450
|
#
|
|
451
451
|
# @return [self] returns itself
|
|
452
452
|
def set_attribute(key, value)
|
|
453
|
-
|
|
454
|
-
@attributes[key] = value
|
|
453
|
+
set_tag(key, value)
|
|
455
454
|
self
|
|
456
455
|
end
|
|
457
456
|
# alias []= set_attribute
|
|
@@ -470,8 +469,11 @@ module Instana
|
|
|
470
469
|
#
|
|
471
470
|
# @return [self] returns itself
|
|
472
471
|
def add_attributes(attributes)
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
return unless attributes.is_a?(Hash)
|
|
473
|
+
|
|
474
|
+
attributes.each do |k, v|
|
|
475
|
+
set_tag(k, v)
|
|
476
|
+
end
|
|
475
477
|
self
|
|
476
478
|
end
|
|
477
479
|
|
data/lib/instana/trace/tracer.rb
CHANGED
|
@@ -124,7 +124,7 @@ module Instana
|
|
|
124
124
|
Span.new(name)
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
current_span.
|
|
127
|
+
current_span.add_attributes(kvs) unless kvs.empty?
|
|
128
128
|
current_span
|
|
129
129
|
end
|
|
130
130
|
|
|
@@ -142,7 +142,7 @@ module Instana
|
|
|
142
142
|
else
|
|
143
143
|
Span.new(name, child_of)
|
|
144
144
|
end
|
|
145
|
-
new_span.
|
|
145
|
+
new_span.add_attributes(kvs) if kvs
|
|
146
146
|
self.current_span = new_span
|
|
147
147
|
end
|
|
148
148
|
|
|
@@ -153,7 +153,7 @@ module Instana
|
|
|
153
153
|
def log_info(kvs)
|
|
154
154
|
return unless current_span
|
|
155
155
|
|
|
156
|
-
current_span.
|
|
156
|
+
current_span.add_attributes(kvs)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
# Add an error to the current span
|
|
@@ -181,7 +181,7 @@ module Instana
|
|
|
181
181
|
@logger.warn "Span mismatch: Attempt to end #{name} span but #{current_span.name} is active."
|
|
182
182
|
end
|
|
183
183
|
|
|
184
|
-
current_span.
|
|
184
|
+
current_span.add_attributes(kvs)
|
|
185
185
|
current_span.close
|
|
186
186
|
|
|
187
187
|
self.current_span = current_span.parent || nil
|
|
@@ -203,7 +203,7 @@ module Instana
|
|
|
203
203
|
@logger.warn "Span mismatch: Attempt to end #{name} span but #{current_span.name} is active."
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
current_span.
|
|
206
|
+
current_span.add_attributes(kvs)
|
|
207
207
|
current_span.close(end_time)
|
|
208
208
|
self.current_span = nil
|
|
209
209
|
end
|
|
@@ -225,7 +225,7 @@ module Instana
|
|
|
225
225
|
return unless tracing?
|
|
226
226
|
|
|
227
227
|
new_span = Span.new(name, current_span)
|
|
228
|
-
new_span.
|
|
228
|
+
new_span.add_attributes(kvs) unless kvs.empty?
|
|
229
229
|
new_span
|
|
230
230
|
end
|
|
231
231
|
|
|
@@ -235,7 +235,7 @@ module Instana
|
|
|
235
235
|
# @param span [Span] the span for this Async op (previously returned from `log_async_entry`)
|
|
236
236
|
#
|
|
237
237
|
def log_async_info(kvs, span)
|
|
238
|
-
span.
|
|
238
|
+
span.add_attributes(kvs)
|
|
239
239
|
end
|
|
240
240
|
|
|
241
241
|
# Add an error to an asynchronous span
|
|
@@ -254,7 +254,7 @@ module Instana
|
|
|
254
254
|
# @param span [Span] the span for this Async op (previously returned from `log_async_entry`)
|
|
255
255
|
#
|
|
256
256
|
def log_async_exit(_name, kvs, span)
|
|
257
|
-
span.
|
|
257
|
+
span.add_attributes(kvs) unless kvs.empty?
|
|
258
258
|
span.close
|
|
259
259
|
end
|
|
260
260
|
|
|
@@ -323,7 +323,7 @@ module Instana
|
|
|
323
323
|
# with_parent=current context, start_timestamp=current time.
|
|
324
324
|
#
|
|
325
325
|
def start_span(name, with_parent: nil, attributes: nil, links: nil, start_timestamp: ::Instana::Util.now_in_ms, kind: nil) # rubocop:disable Metrics/ParameterLists
|
|
326
|
-
return if !::Instana.agent.ready? || !::Instana.config[:tracing][:enabled]
|
|
326
|
+
return Instana::Trace.non_recording_span(with_parent) if !::Instana.agent.ready? || !::Instana.config[:tracing][:enabled]
|
|
327
327
|
|
|
328
328
|
with_parent ||= OpenTelemetry::Context.current
|
|
329
329
|
name ||= 'empty'
|
data/lib/instana/trace.rb
CHANGED
data/lib/instana/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: instana
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.6.
|
|
4
|
+
version: 2.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Giacomo Lombardo
|
|
@@ -362,7 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
362
362
|
- !ruby/object:Gem::Version
|
|
363
363
|
version: '0'
|
|
364
364
|
requirements: []
|
|
365
|
-
rubygems_version: 4.0.
|
|
365
|
+
rubygems_version: 4.0.10
|
|
366
366
|
specification_version: 4
|
|
367
367
|
summary: Ruby Distributed Tracing & Metrics Sensor for Instana
|
|
368
368
|
test_files: []
|