aspecto-opentelemetry-instrumentation-aws_sdk 0.1.4 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dac418df022dc543ee882cea6830b87325ba92d2adc1be9e5e2d2221ab4e8ee
|
4
|
+
data.tar.gz: 6eaebb7d974533635d7215e53244b9865cc6c5d56a44e811d6de1ff9b6d0f608
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b25f6c3b3dc0bfac3a808a2080a2a8ca5024d1c87b04944decac672fac176574da1b4e7ce7f3275708bb43e238fcb497e42ed82d7ec6ad6dec4a18f77ac5ed72
|
7
|
+
data.tar.gz: d9e3dab08de91b76ec74909ff3a83096f114d48c03acbb4e493e069528565878e7c2ba5535fe8c97d983d8b87832323635238d2b9f22ba985dc9c6be1fcef764
|
@@ -17,7 +17,7 @@ module OpenTelemetry
|
|
17
17
|
def call(context) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
18
18
|
return super unless context
|
19
19
|
|
20
|
-
service_name = context.client.class.
|
20
|
+
service_name = context.client.class.to_s.split('::')[1]
|
21
21
|
operation = context.operation&.name
|
22
22
|
client_method = "#{service_name}.#{operation}"
|
23
23
|
attributes = {
|
@@ -30,7 +30,7 @@ module OpenTelemetry
|
|
30
30
|
MessagingHelper.apply_sqs_attributes(attributes, context, client_method) if service_name == 'SQS'
|
31
31
|
MessagingHelper.apply_sns_attributes(attributes, context, client_method) if service_name == 'SNS'
|
32
32
|
|
33
|
-
tracer.in_span(span_name(context, client_method), attributes: attributes, kind: span_kind(
|
33
|
+
tracer.in_span(span_name(context, client_method), attributes: attributes, kind: span_kind(operation)) do |span|
|
34
34
|
inject_context(context, client_method)
|
35
35
|
if instrumentation_config[:suppress_internal_instrumentation]
|
36
36
|
OpenTelemetry::Common::Utilities.untraced { super }
|
@@ -69,7 +69,7 @@ module OpenTelemetry
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
def span_kind(
|
72
|
+
def span_kind(client_method)
|
73
73
|
case client_method
|
74
74
|
when SQS_SEND_MESSAGE, SQS_SEND_MESSAGE_BATCH, SNS_PUBLISH
|
75
75
|
OpenTelemetry::Trace::SpanKind::PRODUCER
|
@@ -11,10 +11,10 @@ module OpenTelemetry
|
|
11
11
|
class MessagingHelper
|
12
12
|
class << self
|
13
13
|
def queue_name(context) # rubocop:disable Metrics/CyclomaticComplexity
|
14
|
-
topic_arn = params
|
15
|
-
target_arn = params
|
16
|
-
phone_number = params
|
17
|
-
queue_url = params
|
14
|
+
topic_arn = context.params[:topic_arn]
|
15
|
+
target_arn = context.params[:target_arn]
|
16
|
+
phone_number = context.params[:phone_number]
|
17
|
+
queue_url = context.params[:queue_url]
|
18
18
|
|
19
19
|
if topic_arn || target_arn
|
20
20
|
arn = topic_arn || target_arn
|
@@ -36,7 +36,7 @@ module OpenTelemetry
|
|
36
36
|
attributes[SemanticConventions::Trace::MESSAGING_SYSTEM] = 'aws.sqs'
|
37
37
|
attributes[SemanticConventions::Trace::MESSAGING_DESTINATION_KIND] = 'queue'
|
38
38
|
attributes[SemanticConventions::Trace::MESSAGING_DESTINATION] = queue_name(context)
|
39
|
-
attributes[SemanticConventions::Trace::MESSAGING_URL] = params
|
39
|
+
attributes[SemanticConventions::Trace::MESSAGING_URL] = context.params[:queue_url]
|
40
40
|
|
41
41
|
attributes[SemanticConventions::Trace::MESSAGING_OPERATION] = 'receive' if client_method == 'SQS.ReceiveMessage'
|
42
42
|
end
|
@@ -49,10 +49,6 @@ module OpenTelemetry
|
|
49
49
|
attributes[SemanticConventions::Trace::MESSAGING_DESTINATION_KIND] = 'topic'
|
50
50
|
attributes[SemanticConventions::Trace::MESSAGING_DESTINATION] = queue_name(context)
|
51
51
|
end
|
52
|
-
|
53
|
-
def params(context, param)
|
54
|
-
defined?(context.metadata[:original_params][param]) ? context.metadata[:original_params][param] : context.params[param]
|
55
|
-
end
|
56
52
|
end
|
57
53
|
end
|
58
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspecto-opentelemetry-instrumentation-aws_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspecto Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -244,10 +244,10 @@ homepage: https://aspecto.io
|
|
244
244
|
licenses:
|
245
245
|
- Apache-2.0
|
246
246
|
metadata:
|
247
|
-
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-aws_sdk/v0.1.
|
247
|
+
changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-aws_sdk/v0.1.5/file.CHANGELOG.html
|
248
248
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/aws_sdk
|
249
249
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
|
250
|
-
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-aws_sdk/v0.1.
|
250
|
+
documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-aws_sdk/v0.1.5
|
251
251
|
post_install_message:
|
252
252
|
rdoc_options: []
|
253
253
|
require_paths:
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
266
|
+
rubygems_version: 3.1.4
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: AWS SDK instrumentation for the OpenTelemetry framework
|