Class: StackifyRubyAPM::TransportSelector Private

Inherits:
Object
  • Object
show all
Defined in:
lib/stackify_apm/transport_selector.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ TransportSelector

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TransportSelector.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/stackify_apm/transport_selector.rb', line 10

def initialize(config)
  @transport =
    case config.transport.strip.downcase
    when StackifyRubyAPM::UNIX_SOCKET
      StackifyRubyAPM::UnixSocketClient.new(config)
    when StackifyRubyAPM::AGENT_HTTP
      StackifyRubyAPM::AgentHTTPClient.new(config)
    when StackifyRubyAPM::LOGGING
      StackifyRubyAPM::AWSLoggerClient.new(config)
    else
      StackifyRubyAPM::LogClient.new(config)
    end
end

Instance Attribute Details

#transportObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/stackify_apm/transport_selector.rb', line 8

def transport
  @transport
end