Module: XRay::Plugins::ECS

Includes:
Logging
Defined in:
lib/aws-xray-sdk/plugins/ecs.rb

Overview

Due to lack of ECS container metadata service, the only host information available is the host name.

Constant Summary collapse

ORIGIN =
'AWS::ECS::Container'.freeze

Class Method Summary collapse

Methods included from Logging

#logger, logger, logger=

Class Method Details

.awsObject



13
14
15
16
17
18
19
20
# File 'lib/aws-xray-sdk/plugins/ecs.rb', line 13

def self.aws
  @@aws ||= begin
    { ecs: { container: Socket.gethostname } }
  rescue StandardError => e
    @@aws = {}
    Logging.logger.warn %(can not get the ecs container hostname due to: #{e.message}.)
  end
end