Sha256: 0b11f3b4ef195d86deee55f5031e0cfe70ab27ce04cbf9f98b951beed6f54936
Contents?: true
Size: 807 Bytes
Versions: 9
Compression:
Stored size: 807 Bytes
Contents
module Honeybadger module Util class Lambda AWS_ENV_MAP = { "_HANDLER" => "handler", "AWS_REGION" => "region", "AWS_EXECUTION_ENV" => "runtime", "AWS_LAMBDA_FUNCTION_NAME" => "function", "AWS_LAMBDA_FUNCTION_MEMORY_SIZE" => "memory", "AWS_LAMBDA_FUNCTION_VERSION" => "version", "AWS_LAMBDA_LOG_GROUP_NAME" => "log_group", "AWS_LAMBDA_LOG_STREAM_NAME" => "log_name" }.freeze class << self def lambda_execution? !!ENV["AWS_EXECUTION_ENV"] end def normalized_data AWS_ENV_MAP.each_with_object({}) do |(k, v), memo| memo[v] = ENV[k] if ENV[k] end end def trace_id ENV["_X_AMZN_TRACE_ID"] end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems