opentelemetry-instrumentation-aws_sdk 0.9.1 → 0.11.0
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/CHANGELOG.md +12 -0
- data/README.md +5 -3
- data/lib/opentelemetry/instrumentation/aws_sdk/handler.rb +1 -2
- data/lib/opentelemetry/instrumentation/aws_sdk/handler_helper.rb +4 -0
- data/lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb +21 -8
- data/lib/opentelemetry/instrumentation/aws_sdk/patches/telemetry.rb +1 -1
- data/lib/opentelemetry/instrumentation/aws_sdk/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d8d6a60aa5e88f724d0603667942f03ae96a736baf3ab09c6e80e9184a8b966
|
|
4
|
+
data.tar.gz: 22d7c6114027fb52442485ce2ed69dcdec39b04bda7744af03036730533b923e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68443901421bc079239cf84756ff7270b0c04b64ffe11f11df701b5cab0e842b5060ba377e466cb68be1b40bff691a324c9122756b467717cd425a1846631914
|
|
7
|
+
data.tar.gz: 7341155bc2e033c56dd705e4d40cdaa811fb976b2aab23623739157d7215604b061c68c07fbd1a8b0acc6e7fef9bf3803f6bbc6989ad0dac85454a839077b5b7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Release History: opentelemetry-instrumentation-aws_sdk
|
|
2
2
|
|
|
3
|
+
### v0.11.0 / 2025-10-22
|
|
4
|
+
|
|
5
|
+
* BREAKING CHANGE: Min Ruby Version 3.2
|
|
6
|
+
|
|
7
|
+
* ADDED: Min Ruby Version 3.2
|
|
8
|
+
|
|
9
|
+
### v0.10.0 / 2025-10-11
|
|
10
|
+
|
|
11
|
+
* BREAKING CHANGE: Suppress internal spans by default
|
|
12
|
+
|
|
13
|
+
* ADDED: Suppress internal spans by default
|
|
14
|
+
|
|
3
15
|
### v0.9.1 / 2025-09-30
|
|
4
16
|
|
|
5
17
|
* FIXED: Min OTel Ruby API 1.7
|
data/README.md
CHANGED
|
@@ -20,7 +20,7 @@ To install the instrumentation, call `use` with the name of the instrumentation.
|
|
|
20
20
|
OpenTelemetry::SDK.configure do |c|
|
|
21
21
|
c.use 'OpenTelemetry::Instrumentation::AwsSdk', {
|
|
22
22
|
inject_messaging_context: true,
|
|
23
|
-
|
|
23
|
+
enable_internal_instrumentation: true
|
|
24
24
|
}
|
|
25
25
|
end
|
|
26
26
|
```
|
|
@@ -36,8 +36,10 @@ end
|
|
|
36
36
|
This instrumentation offers the following configuration options:
|
|
37
37
|
* `:inject_messaging_context` (default: `false`): When set to `true`, adds context key/value
|
|
38
38
|
to Message Attributes for SQS/SNS messages.
|
|
39
|
-
* `
|
|
40
|
-
span kind of `internal` are
|
|
39
|
+
* `:enable_internal_instrumentation` (default: `false`): When set to `true`, any spans with
|
|
40
|
+
span kind of `internal` are traced.
|
|
41
|
+
* `:suppress_internal_instrumentation`: **Deprecated**. This configuration has been
|
|
42
|
+
deprecated in favor of `:enable_internal_instrumentation`
|
|
41
43
|
|
|
42
44
|
## Integration with SDK V3's Telemetry support
|
|
43
45
|
AWS SDK for Ruby V3 added support for Observability which includes a new configuration,
|
|
@@ -23,7 +23,7 @@ module OpenTelemetry
|
|
|
23
23
|
) do |span|
|
|
24
24
|
MessagingHelper.inject_context_if_supported(context, client_method, service_id)
|
|
25
25
|
|
|
26
|
-
if HandlerHelper.
|
|
26
|
+
if HandlerHelper.skip_internal_instrumentation?
|
|
27
27
|
OpenTelemetry::Common::Utilities.untraced { super }
|
|
28
28
|
else
|
|
29
29
|
super
|
|
@@ -32,7 +32,6 @@ module OpenTelemetry
|
|
|
32
32
|
OpenTelemetry::SemanticConventions::Trace::HTTP_STATUS_CODE,
|
|
33
33
|
context.http_response.status_code
|
|
34
34
|
)
|
|
35
|
-
|
|
36
35
|
if (err = response.error)
|
|
37
36
|
span.record_exception(err)
|
|
38
37
|
span.status = Trace::Status.error(err.to_s)
|
|
@@ -14,6 +14,10 @@ module OpenTelemetry
|
|
|
14
14
|
AwsSdk::Instrumentation.instance.config
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
def skip_internal_instrumentation?
|
|
18
|
+
instrumentation_config[:enable_internal_instrumentation] == false
|
|
19
|
+
end
|
|
20
|
+
|
|
17
21
|
def client_method(service_id, context)
|
|
18
22
|
"#{service_id}.#{context.operation.name}".delete(' ')
|
|
19
23
|
end
|
|
@@ -19,24 +19,27 @@ module OpenTelemetry
|
|
|
19
19
|
# - `false` **(default)** - Context key/value will not be added.
|
|
20
20
|
# - `true` - Context key/value will be added.
|
|
21
21
|
#
|
|
22
|
-
# ### `:
|
|
22
|
+
# ### `:enable_internal_instrumentation`
|
|
23
|
+
# Enables tracing of spans of `internal` span kind.
|
|
23
24
|
#
|
|
24
|
-
#
|
|
25
|
+
# - `false` **(default)** - Internal spans are not traced
|
|
26
|
+
# - `true` - Internal spans are traced.
|
|
25
27
|
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
+
# ### `:suppress_internal_instrumentation` (deprecated)
|
|
29
|
+
# This configuration has been deprecated in favor of `:enable_internal_instrumentation`
|
|
28
30
|
#
|
|
29
31
|
# @example An explicit default configuration
|
|
30
32
|
# OpenTelemetry::SDK.configure do |c|
|
|
31
33
|
# c.use 'OpenTelemetry::Instrumentation::AwsSdk', {
|
|
32
34
|
# inject_messaging_context: false,
|
|
33
|
-
#
|
|
35
|
+
# enable_internal_instrumentation: false
|
|
34
36
|
# }
|
|
35
37
|
# end
|
|
36
38
|
class Instrumentation < OpenTelemetry::Instrumentation::Base
|
|
37
39
|
MINIMUM_VERSION = Gem::Version.new('2.0.0')
|
|
38
40
|
|
|
39
|
-
install do |
|
|
41
|
+
install do |config|
|
|
42
|
+
resolve_config(config)
|
|
40
43
|
require_dependencies
|
|
41
44
|
patch_telemetry_plugin if telemetry_plugin?
|
|
42
45
|
add_plugins(Seahorse::Client::Base, *loaded_service_clients)
|
|
@@ -52,6 +55,7 @@ module OpenTelemetry
|
|
|
52
55
|
|
|
53
56
|
option :inject_messaging_context, default: false, validate: :boolean
|
|
54
57
|
option :suppress_internal_instrumentation, default: false, validate: :boolean
|
|
58
|
+
option :enable_internal_instrumentation, default: false, validate: :boolean
|
|
55
59
|
|
|
56
60
|
def gem_version
|
|
57
61
|
if Gem.loaded_specs['aws-sdk']
|
|
@@ -65,6 +69,15 @@ module OpenTelemetry
|
|
|
65
69
|
|
|
66
70
|
private
|
|
67
71
|
|
|
72
|
+
def resolve_config(config)
|
|
73
|
+
return unless config[:suppress_internal_instrumentation]
|
|
74
|
+
|
|
75
|
+
OpenTelemetry.logger.warn(
|
|
76
|
+
'Instrumentation AwsSdk configuration option suppress_internal_instrumentation has been deprecated,' \
|
|
77
|
+
'use enable_internal_instrumentation option instead'
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
68
81
|
def require_dependencies
|
|
69
82
|
require_relative 'handler'
|
|
70
83
|
require_relative 'handler_helper'
|
|
@@ -92,7 +105,7 @@ module OpenTelemetry
|
|
|
92
105
|
|
|
93
106
|
# Patches AWS SDK V3's telemetry plugin for integration
|
|
94
107
|
# This patch supports configuration set by this gem and
|
|
95
|
-
# additional span attributes that
|
|
108
|
+
# additional span attributes that were not provided by the plugin
|
|
96
109
|
def patch_telemetry_plugin
|
|
97
110
|
::Aws::Plugins::Telemetry::Handler.prepend(Patches::Handler)
|
|
98
111
|
end
|
|
@@ -112,7 +125,7 @@ module OpenTelemetry
|
|
|
112
125
|
|
|
113
126
|
# This check does the following:
|
|
114
127
|
# 1 - Checks if the service client is autoload or not
|
|
115
|
-
# 2 - Validates whether
|
|
128
|
+
# 2 - Validates whether it is a service client
|
|
116
129
|
# note that Seahorse::Client::Base is a superclass for V3 clients
|
|
117
130
|
# but for V2, it is Aws::Client
|
|
118
131
|
# rubocop:disable Style/MultipleComparison
|
|
@@ -26,7 +26,7 @@ module OpenTelemetry
|
|
|
26
26
|
) do |span|
|
|
27
27
|
MessagingHelper.inject_context_if_supported(context, client_method, service_id)
|
|
28
28
|
|
|
29
|
-
if HandlerHelper.
|
|
29
|
+
if HandlerHelper.skip_internal_instrumentation?
|
|
30
30
|
OpenTelemetry::Common::Utilities.untraced { super }
|
|
31
31
|
else
|
|
32
32
|
yield span
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opentelemetry-instrumentation-aws_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenTelemetry Authors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: opentelemetry-instrumentation-base
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.25'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0.
|
|
26
|
+
version: '0.25'
|
|
27
27
|
description: AWS SDK instrumentation for the OpenTelemetry framework
|
|
28
28
|
email:
|
|
29
29
|
- cncf-opentelemetry-contributors@lists.cncf.io
|
|
@@ -49,10 +49,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
|
49
49
|
licenses:
|
|
50
50
|
- Apache-2.0
|
|
51
51
|
metadata:
|
|
52
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-aws_sdk/0.
|
|
52
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-aws_sdk/0.11.0/file/CHANGELOG.md
|
|
53
53
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/aws_sdk
|
|
54
54
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
|
55
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-aws_sdk/0.
|
|
55
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-aws_sdk/0.11.0
|
|
56
56
|
post_install_message:
|
|
57
57
|
rdoc_options: []
|
|
58
58
|
require_paths:
|
|
@@ -61,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
61
61
|
requirements:
|
|
62
62
|
- - ">="
|
|
63
63
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: '3.
|
|
64
|
+
version: '3.2'
|
|
65
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
67
67
|
- - ">="
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
69
|
version: '0'
|
|
70
70
|
requirements: []
|
|
71
|
-
rubygems_version: 3.
|
|
71
|
+
rubygems_version: 3.4.19
|
|
72
72
|
signing_key:
|
|
73
73
|
specification_version: 4
|
|
74
74
|
summary: AWS SDK instrumentation for the OpenTelemetry framework
|