Module: Honeycomb::Redis::Configuration

Defined in:
lib/honeycomb/integrations/redis.rb

Overview

Patches Redis with the option to configure the Honeycomb client.

When you load this integration, each Redis call will be wrapped in a span containing information about the command being invoked.

This module automatically gets mixed into the Redis class so you can change the underlying Client. By default, we use the global Honeycomb.client to send events. A nil client will disable the integration altogether.

Examples:

Custom client

Redis.honeycomb_client = Honeycomb::Client.new(...)

Disabling instrumentation

Redis.honeycomb_client = nil

Instance Attribute Summary collapse

Instance Attribute Details

#honeycomb_clientObject



25
26
27
28
29
# File 'lib/honeycomb/integrations/redis.rb', line 25

def honeycomb_client
  return @honeycomb_client if defined?(@honeycomb_client)

  Honeycomb.client
end