Module: Honeycomb

Extended by:
Forwardable
Defined in:
lib/honeycomb-beeline.rb,
lib/honeycomb/span.rb,
lib/honeycomb/trace.rb,
lib/honeycomb/client.rb,
lib/honeycomb/context.rb,
lib/honeycomb/propagation.rb,
lib/honeycomb/configuration.rb,
lib/honeycomb/rollup_fields.rb,
lib/honeycomb/beeline/version.rb,
lib/honeycomb/propagation/aws.rb,
lib/honeycomb/propagation/w3c.rb,
lib/honeycomb/integrations/aws.rb,
lib/honeycomb/integrations/rack.rb,
lib/honeycomb/integrations/rake.rb,
lib/honeycomb/integrations/rails.rb,
lib/honeycomb/integrations/redis.rb,
lib/honeycomb/integrations/sequel.rb,
lib/honeycomb/integrations/warden.rb,
lib/honeycomb/propagation/context.rb,
lib/honeycomb/propagation/default.rb,
lib/honeycomb/integrations/faraday.rb,
lib/honeycomb/integrations/railtie.rb,
lib/honeycomb/integrations/sinatra.rb,
lib/honeycomb/deterministic_sampler.rb,
lib/honeycomb/propagation/honeycomb.rb,
lib/honeycomb/propagation/default_modern.rb,
lib/honeycomb/integrations/active_support.rb,
lib/honeycomb/propagation/honeycomb_modern.rb

Overview

main module

Defined Under Namespace

Modules: AWSPropagation, ActiveSupport, Aws, Beeline, DefaultModernPropagation, DefaultPropagation, DeterministicSampler, HoneycombModernPropagation, HoneycombPropagation, Propagation, PropagationParser, PropagationSerializer, Rack, Rails, Rake, Redis, RollupFields, Sequel, Sinatra, W3CPropagation, Warden Classes: Client, Configuration, Context, Faraday, Railtie, Span, Trace

Constant Summary collapse

INTEGRATIONS =
%i[
  active_support
  aws
  faraday
  rack
  rails
  railtie
  rake
  redis
  sequel
  sinatra
].freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientObject (readonly)

Returns the value of attribute client.



26
27
28
# File 'lib/honeycomb-beeline.rb', line 26

def client
  @client
end

Class Method Details

.configureObject



32
33
34
35
36
37
38
39
# File 'lib/honeycomb-beeline.rb', line 32

def configure
  Configuration.new.tap do |config|
    yield config
    @client = Honeycomb::Client.new(configuration: config)
  end

  @client
end

.integrations_to_loadObject



48
49
50
51
52
53
54
# File 'lib/honeycomb-beeline.rb', line 48

def integrations_to_load
  if ENV["HONEYCOMB_INTEGRATIONS"]
    ENV["HONEYCOMB_INTEGRATIONS"].split(",")
  else
    INTEGRATIONS
  end
end

.load_integrationsObject



41
42
43
44
45
46
# File 'lib/honeycomb-beeline.rb', line 41

def load_integrations
  integrations_to_load.each do |integration|
    require "honeycomb/integrations/#{integration}"
  rescue LoadError
  end
end