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 +5 -5
- data/lib/aws-xray-sdk/context/default_context.rb +1 -1
- data/lib/aws-xray-sdk/exceptions.rb +1 -1
- data/lib/aws-xray-sdk/facets/helper.rb +1 -1
- data/lib/aws-xray-sdk/facets/rails/active_record.rb +6 -1
- data/lib/aws-xray-sdk/plugins/ec2.rb +2 -2
- data/lib/aws-xray-sdk/plugins/ecs.rb +1 -1
- data/lib/aws-xray-sdk/plugins/elastic_beanstalk.rb +1 -1
- data/lib/aws-xray-sdk/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd1eb76edb60040386a2f0742b166868cd136cb758937b270d9387ff00b9284c
|
4
|
+
data.tar.gz: 26a8ca7ef0a34cccc9542b83c2454d2577760d171118a79a20567dd765b8955c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6f3c2945fb499e53d5a6b4b4d3ad9467b6ed541934aae2fa1b02a13dd13a7052644985391c809308edc02715067de2103664b3336f39d1819c77c83e0867629
|
7
|
+
data.tar.gz: a61d068ec3c5536d884f4848712fe48aaa9774b7d89dc2a42475b70fcee5b534b38ac75d532727d98d09c0cc71518f4497449bcd08e71f73c79a876a866b627c
|
@@ -2,7 +2,7 @@ require 'aws-xray-sdk/model/trace_header'
|
|
2
2
|
|
3
3
|
module XRay
|
4
4
|
module Facets
|
5
|
-
#
|
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
|
-
|
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 %(
|
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 %(
|
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 %(
|
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 %(
|
20
|
+
Logging.logger.warn %(cannot get the environment config due to: #{e.message}.)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
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.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:
|
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
|
-
|
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
|