Class: Honeycomb::Aws::Plugin
- Inherits:
-
Seahorse::Client::Plugin
- Object
- Seahorse::Client::Plugin
- Honeycomb::Aws::Plugin
- Defined in:
- lib/honeycomb/integrations/aws.rb
Overview
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.
Instance Method Summary collapse
Instance Method Details
#add_handlers(handlers, config) ⇒ Object
63 64 65 66 67 68 |
# 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 |