Module: XRay::Plugins::ECS

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

Constant Summary collapse

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

Only compatible with v4! The v3 metadata url does not contain cloudwatch informations

'ECS_CONTAINER_METADATA_URI_V4'

Class Method Summary collapse

Methods included from Logging

#logger, logger, logger=

Class Method Details

.awsObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/aws-xray-sdk/plugins/ecs.rb', line 15

def self.aws
   = ()

  begin
    [:ecs][:container] = Socket.gethostname
  rescue StandardError => e
    Logging.logger.warn %(cannot get the ecs container hostname due to: #{e.message}.)
    [:ecs][:container] = nil
  end

  @@aws = {
    ecs: [:ecs],
    cloudwatch_logs: [:cloudwatch_logs]
  }
end