aws-xray-sdk 0.12.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-xray-sdk/context/default_context.rb +1 -1
- data/lib/aws-xray-sdk/facets/aws_sdk.rb +2 -2
- data/lib/aws-xray-sdk/facets/net_http.rb +4 -3
- data/lib/aws-xray-sdk/facets/resources/{aws_params_whitelist.rb → aws_params_allowlist.rb} +5 -0
- data/lib/aws-xray-sdk/facets/resources/{aws_services_whitelist.rb → aws_services_allowlist.rb} +2 -0
- data/lib/aws-xray-sdk/model/entity.rb +2 -1
- data/lib/aws-xray-sdk/plugins/ec2.rb +3 -1
- data/lib/aws-xray-sdk/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c1d1cb98a0d55632a4f77d366d4722008401851555c0ab515236f03837b323
|
4
|
+
data.tar.gz: a0c68de2fadd545185740d95264312687a131e6cdb7d448993ad20b86e9b8084
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d30fc99a86495bc0cd41100b4b563cec11eab0f05ea14afa3ae8f9cd51fe91ebaa3bfe961d368e895caf7aac0ca88016cc0c90d85ead87f03b0c1678fc1ecf4
|
7
|
+
data.tar.gz: 56318868c3beea5f5c67635d2a6ec6b3d9e624bfff9ac1c310b0f6b0c4871768ed9213ae69289b91a9f74f7ae69a8f0bd2b1e0f8283852b0670c26ff137eeccd
|
@@ -13,7 +13,7 @@ module XRay
|
|
13
13
|
LOCAL_KEY = '_aws_xray_entity'.freeze
|
14
14
|
CONTEXT_MISSING_KEY = 'AWS_XRAY_CONTEXT_MISSING'.freeze
|
15
15
|
SUPPORTED_STRATEGY = %w[RUNTIME_ERROR LOG_ERROR IGNORE_ERROR].freeze
|
16
|
-
DEFAULT_STRATEGY = SUPPORTED_STRATEGY[
|
16
|
+
DEFAULT_STRATEGY = SUPPORTED_STRATEGY[1]
|
17
17
|
|
18
18
|
attr_reader :context_missing
|
19
19
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'aws-sdk-core'
|
2
2
|
require 'aws-xray-sdk/facets/helper'
|
3
|
-
require 'aws-xray-sdk/facets/resources/
|
4
|
-
require 'aws-xray-sdk/facets/resources/
|
3
|
+
require 'aws-xray-sdk/facets/resources/aws_params_allowlist'
|
4
|
+
require 'aws-xray-sdk/facets/resources/aws_services_allowlist'
|
5
5
|
|
6
6
|
module XRay
|
7
7
|
class AwsSDKPlugin < Seahorse::Client::Plugin
|
@@ -29,9 +29,10 @@ module XRay
|
|
29
29
|
def xray_sampling_request?(req)
|
30
30
|
req.path && (req.path == ('/GetSamplingRules') || req.path == ('/SamplingTargets'))
|
31
31
|
end
|
32
|
-
|
33
|
-
#
|
34
|
-
#
|
32
|
+
|
33
|
+
# HTTP requests to IMDS endpoint will be made to 169.254.169.254
|
34
|
+
# for both IMDSv1 and IMDSv2 with the latter including the
|
35
|
+
# X-aws-ec2-metadata-token-ttl-seconds header.
|
35
36
|
def ec2_metadata_request?(req)
|
36
37
|
req.uri && req.uri.hostname == '169.254.169.254'
|
37
38
|
end
|
data/lib/aws-xray-sdk/facets/resources/{aws_services_whitelist.rb → aws_services_allowlist.rb}
RENAMED
@@ -103,6 +103,7 @@ module XRay
|
|
103
103
|
GuardDuty
|
104
104
|
Health
|
105
105
|
IAM
|
106
|
+
IVS
|
106
107
|
Imagebuilder
|
107
108
|
ImportExport
|
108
109
|
Inspector
|
@@ -135,6 +136,7 @@ module XRay
|
|
135
136
|
LexRuntimeService
|
136
137
|
LicenseManager
|
137
138
|
Lightsail
|
139
|
+
LocationService
|
138
140
|
MachineLearning
|
139
141
|
Macie
|
140
142
|
ManagedBlockchain
|
@@ -155,7 +155,8 @@ module XRay
|
|
155
155
|
if (a = annotations.to_h) && !a.empty?
|
156
156
|
h[:annotations] = a
|
157
157
|
end
|
158
|
-
|
158
|
+
# make sure @metadata is defined before evaluating it, to prevent warning `variable @metadata not initialized`
|
159
|
+
if (defined?(@metadata) && m = @metadata) && !m.to_h.empty?
|
159
160
|
h[:metadata] = m.to_h
|
160
161
|
end
|
161
162
|
|
@@ -5,12 +5,14 @@ require 'aws-xray-sdk/logger'
|
|
5
5
|
module XRay
|
6
6
|
module Plugins
|
7
7
|
# A plugin that gets the EC2 instance_id, availabiity_zone, instance_type, and ami_id if running on an EC2 instance.
|
8
|
+
# The plugin queries IMDSv2 endpoint with X-aws-ec2-metadata-token-ttl-seconds as 60 seconds, and fallback to using
|
9
|
+
# IMDSv1 endpoint.
|
10
|
+
# More details about EC2 instance metadata retreival: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-retrieval
|
8
11
|
module EC2
|
9
12
|
include Logging
|
10
13
|
|
11
14
|
ORIGIN = 'AWS::EC2::Instance'.freeze
|
12
15
|
|
13
|
-
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-retrieval
|
14
16
|
METADATA_BASE_URL = 'http://169.254.169.254/latest'.freeze
|
15
17
|
|
16
18
|
def self.aws
|
data/lib/aws-xray-sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-xray-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-xray
|
@@ -186,8 +186,8 @@ files:
|
|
186
186
|
- lib/aws-xray-sdk/facets/rails/active_record.rb
|
187
187
|
- lib/aws-xray-sdk/facets/rails/ex_middleware.rb
|
188
188
|
- lib/aws-xray-sdk/facets/rails/railtie.rb
|
189
|
-
- lib/aws-xray-sdk/facets/resources/
|
190
|
-
- lib/aws-xray-sdk/facets/resources/
|
189
|
+
- lib/aws-xray-sdk/facets/resources/aws_params_allowlist.rb
|
190
|
+
- lib/aws-xray-sdk/facets/resources/aws_services_allowlist.rb
|
191
191
|
- lib/aws-xray-sdk/lambda.rb
|
192
192
|
- lib/aws-xray-sdk/lambda/facade_segment.rb
|
193
193
|
- lib/aws-xray-sdk/lambda/lambda_context.rb
|