aws-xray-sdk 0.11.5 → 0.12.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
- SHA1:
3
- metadata.gz: 9c1ab8a4e8310389271dc8ea0fd7494f067f709d
4
- data.tar.gz: ac7ef8e89a9123cb9d7e9f77ba63d663c55d56d6
2
+ SHA256:
3
+ metadata.gz: cd1eb76edb60040386a2f0742b166868cd136cb758937b270d9387ff00b9284c
4
+ data.tar.gz: 26a8ca7ef0a34cccc9542b83c2454d2577760d171118a79a20567dd765b8955c
5
5
  SHA512:
6
- metadata.gz: a05a1d2a8c8a18df8503ac1943ff713c6e65a5991cba6790e66273e63b70748d726f8173ac2427d00808fdeb2519e63aa60ce8a13c22111652fa7b504d100c5c
7
- data.tar.gz: 2e3f7eb44a7330d971dbbe562a6786d2aedb9a7319982c71c8cd7143c3ebe2d35c30a4dcdd5489e689ae7b26fe1dc6230a0dc82d8e727e9c5699f03378e73d39
6
+ metadata.gz: f6f3c2945fb499e53d5a6b4b4d3ad9467b6ed541934aae2fa1b02a13dd13a7052644985391c809308edc02715067de2103664b3336f39d1819c77c83e0867629
7
+ data.tar.gz: a61d068ec3c5536d884f4848712fe48aaa9774b7d89dc2a42475b70fcee5b534b38ac75d532727d98d09c0cc71518f4497449bcd08e71f73c79a876a866b627c
@@ -57,7 +57,7 @@ module XRay
57
57
  when 'RUNTIME_ERROR'
58
58
  raise ContextMissingError
59
59
  when 'LOG_ERROR'
60
- logger.error %(can not find the current context.)
60
+ logger.error %(cannot find the current context.)
61
61
  end
62
62
  nil
63
63
  end
@@ -10,7 +10,7 @@ module XRay
10
10
 
11
11
  class ContextMissingError < AwsXRaySdkError
12
12
  def initialize
13
- super('Can not find any active segment or subsegment.')
13
+ super('Cannot find any active segment or subsegment.')
14
14
  end
15
15
  end
16
16
 
@@ -2,7 +2,7 @@ require 'aws-xray-sdk/model/trace_header'
2
2
 
3
3
  module XRay
4
4
  module Facets
5
- # Hepler functions shared for all external frameworks/libraries
5
+ # Helper functions shared for all external frameworks/libraries
6
6
  # like make sampling decisions from incoming http requests etc.
7
7
  module Helper
8
8
  TRACE_HEADER = 'X-Amzn-Trace-Id'.freeze
@@ -17,7 +17,12 @@ module XRay
17
17
  pool, conn = get_pool_n_conn(payload[:connection_id])
18
18
 
19
19
  return if IGNORE_OPS.include?(payload[:name]) || pool.nil? || conn.nil?
20
- db_config = pool.spec.config
20
+ # The spec notation is Rails < 6.1, later this can be found in the db_config
21
+ db_config = if pool.respond_to?(:spec)
22
+ pool.spec.config
23
+ else
24
+ pool.db_config.configuration_hash
25
+ end
21
26
  name, sql = build_name_sql_meta config: db_config, conn: conn
22
27
  subsegment = XRay.recorder.begin_subsegment name, namespace: 'remote'
23
28
  # subsegment is nil in case of context missing
@@ -33,7 +33,7 @@ module XRay
33
33
  begin
34
34
  return do_request(req)
35
35
  rescue StandardError => e
36
- Logging.logger.warn %(can not get the IMDSv2 token due to: #{e.message}.)
36
+ Logging.logger.warn %(cannot get the IMDSv2 token due to: #{e.message}.)
37
37
  ''
38
38
  end
39
39
  end
@@ -50,7 +50,7 @@ module XRay
50
50
  metadata_json = do_request(req)
51
51
  return parse_metadata(metadata_json)
52
52
  rescue StandardError => e
53
- Logging.logger.warn %(can not get the ec2 instance metadata due to: #{e.message}.)
53
+ Logging.logger.warn %(cannot get the ec2 instance metadata due to: #{e.message}.)
54
54
  {}
55
55
  end
56
56
  end
@@ -15,7 +15,7 @@ module XRay
15
15
  { ecs: { container: Socket.gethostname } }
16
16
  rescue StandardError => e
17
17
  @@aws = {}
18
- Logging.logger.warn %(can not get the ecs container hostname due to: #{e.message}.)
18
+ Logging.logger.warn %(cannot get the ecs container hostname due to: #{e.message}.)
19
19
  end
20
20
  end
21
21
  end
@@ -17,7 +17,7 @@ module XRay
17
17
  { elastic_beanstalk: MultiJson.load(file) }
18
18
  rescue StandardError => e
19
19
  @@aws = {}
20
- Logging.logger.warn %(can not get the environment config due to: #{e.message}.)
20
+ Logging.logger.warn %(cannot get the environment config due to: #{e.message}.)
21
21
  end
22
22
  end
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module XRay
2
- VERSION = '0.11.5'
2
+ VERSION = '0.12.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.11.5
4
+ version: 0.12.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: 2020-06-10 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-xray
@@ -244,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  - !ruby/object:Gem::Version
245
245
  version: '0'
246
246
  requirements: []
247
- rubyforge_project:
248
- rubygems_version: 2.5.2.3
247
+ rubygems_version: 3.1.6
249
248
  signing_key:
250
249
  specification_version: 4
251
250
  summary: AWS X-Ray SDK for Ruby