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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd1eb76edb60040386a2f0742b166868cd136cb758937b270d9387ff00b9284c
4
- data.tar.gz: 26a8ca7ef0a34cccc9542b83c2454d2577760d171118a79a20567dd765b8955c
3
+ metadata.gz: 04c1d1cb98a0d55632a4f77d366d4722008401851555c0ab515236f03837b323
4
+ data.tar.gz: a0c68de2fadd545185740d95264312687a131e6cdb7d448993ad20b86e9b8084
5
5
  SHA512:
6
- metadata.gz: f6f3c2945fb499e53d5a6b4b4d3ad9467b6ed541934aae2fa1b02a13dd13a7052644985391c809308edc02715067de2103664b3336f39d1819c77c83e0867629
7
- data.tar.gz: a61d068ec3c5536d884f4848712fe48aaa9774b7d89dc2a42475b70fcee5b534b38ac75d532727d98d09c0cc71518f4497449bcd08e71f73c79a876a866b627c
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[0]
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/aws_params_whitelist'
4
- require 'aws-xray-sdk/facets/resources/aws_services_whitelist'
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
- # Instance Metadata Service provides endpoint 169.254.169.254 to
34
- # provide EC2 metadata
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
@@ -345,6 +345,11 @@ module XRay
345
345
  request_parameters: %I[
346
346
  topic_arn
347
347
  ]
348
+ },
349
+ publish_batch: {
350
+ request_parameters: %I[
351
+ topic_arn
352
+ ]
348
353
  }
349
354
  }
350
355
  }
@@ -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
- if (m = @metadata) && !m.to_h.empty?
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
@@ -1,3 +1,3 @@
1
1
  module XRay
2
- VERSION = '0.12.0'
2
+ VERSION = '0.14.0'
3
3
  end
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.12.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: 2021-04-09 00:00:00.000000000 Z
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/aws_params_whitelist.rb
190
- - lib/aws-xray-sdk/facets/resources/aws_services_whitelist.rb
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