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:
-
`:honeycomb` - Boolean indicating whether to enable
Honeycomb
instrumentation. Defaults to `true`. -
`:honeycomb_client` - Allows you to set a custom
Honeycomb
client object. Defaults to the global {Honeycomb.client}.
@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
# 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