Class: StackifyRubyAPM::Context::Request::Socket Private

Inherits:
Object
  • Object
show all
Includes:
NaivelyHashable
Defined in:
lib/stackify_apm/context/request/socket.rb

Overview

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.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from NaivelyHashable

#naively_hashable?, #to_h

Constructor Details

#initialize(req) ⇒ Socket

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 Socket.

API:

  • private



12
13
14
15
# File 'lib/stackify_apm/context/request/socket.rb', line 12

def initialize(req)
  @remote_addr = req.ip
  @encrypted = req.scheme == 'https'
end

Instance Attribute Details

#encryptedObject (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.

API:

  • private



17
18
19
# File 'lib/stackify_apm/context/request/socket.rb', line 17

def encrypted
  @encrypted
end

#remote_addrObject (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.

API:

  • private



17
18
19
# File 'lib/stackify_apm/context/request/socket.rb', line 17

def remote_addr
  @remote_addr
end