class Honeycomb::Aws::Plugin

Instruments AWS clients with Honeycomb events.

This plugin is automatically added to any aws-sdk client class your app uses. It uses {SdkHandler} to wrap a Honeycomb span around each invocation of a client object method. Within that span, there is typically at least one actual HTTP API call to Amazon, so each API call is wrapped in a separate span by {ApiHandler}.

This plugin adds the following options which you can use to configure your aws-sdk clients:

@example Disable the Honeycomb AWS integration globally.

Aws.config.update(honeycomb: false)

@example Disable the Honeycomb AWS integration locally.

s3 = Aws::S3::Client.new(honeycomb: false)

@example Use a different client globally.

Aws.config.update(honeycomb_client: custom)

@example Use a different client locally.

dynamodb = Aws::DynamoDB::Client.new(honeycomb_client: custom)

@see docs.aws.amazon.com/sdk-for-ruby/v3/api/index.html#Configuration_Options @see SdkHandler @see ApiHandler

Public Instance Methods

add_handlers(handlers, config) click to toggle source
# File lib/honeycomb/integrations/aws.rb, line 63
def add_handlers(handlers, config)
  return unless config.honeycomb && config.honeycomb_client

  handlers.add(SdkHandler, step: :initialize)
  handlers.add(ApiHandler, step: :sign, priority: 39)
end