Sha256: cd5ff085ceb926e80e192d39c147dac9afef7a0667af154f3aeca05c6fdcd9c5

Contents?: true

Size: 658 Bytes

Versions: 14

Compression:

Stored size: 658 Bytes

Contents

require 'honeybadger/plugin'
require 'honeybadger/util/lambda'

module Honeybadger
  module Plugins
    # @api private
    Plugin.register :lambda do
      requirement { Util::Lambda.lambda_execution? }

      execution do
        config[:sync] = true
        (config[:before_notify] ||= []) << lambda do |notice|
          data = Util::Lambda.normalized_data

          notice.component = data["function"]
          notice.action = data["handler"]
          notice.details["Lambda Details"] = data

          if (trace_id = Util::Lambda.trace_id)
            notice.context[:lambda_trace_id] = trace_id
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
honeybadger-4.11.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.10.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.9.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.8.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.7.3 lib/honeybadger/plugins/lambda.rb
honeybadger-4.7.2 lib/honeybadger/plugins/lambda.rb
honeybadger-4.7.1 lib/honeybadger/plugins/lambda.rb
honeybadger-4.7.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.6.0 lib/honeybadger/plugins/lambda.rb
honeybadger-4.5.6 lib/honeybadger/plugins/lambda.rb
honeybadger-4.5.5 lib/honeybadger/plugins/lambda.rb
honeybadger-4.5.4 lib/honeybadger/plugins/lambda.rb
honeybadger-4.5.3 lib/honeybadger/plugins/lambda.rb
honeybadger-4.5.2 lib/honeybadger/plugins/lambda.rb