Class: Honeybadger::Util::Lambda Private
- Inherits:
-
Object
- Object
- Honeybadger::Util::Lambda
- Defined in:
- lib/honeybadger/util/lambda.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- AWS_ENV_MAP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ "_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 Method Summary collapse
- .lambda_execution? ⇒ Boolean private
- .normalized_data ⇒ Object private
- .trace_id ⇒ Object private
Class Method Details
.lambda_execution? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/honeybadger/util/lambda.rb', line 16 def lambda_execution? !!ENV["AWS_LAMBDA_FUNCTION_NAME"] end |
.normalized_data ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 |
# File 'lib/honeybadger/util/lambda.rb', line 20 def normalized_data AWS_ENV_MAP.each_with_object({}) do |(k, v), memo| memo[v] = ENV[k] if ENV[k] end end |
.trace_id ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/honeybadger/util/lambda.rb', line 26 def trace_id ENV["_X_AMZN_TRACE_ID"] end |