Sha256: 9d6aab5e12788159c37902721c7c5df3523624e1106319203d83b5d2af16ddcb
Contents?: true
Size: 623 Bytes
Versions: 6
Compression:
Stored size: 623 Bytes
Contents
require 'sqreen/ecosystem/module_api' module Sqreen module Ecosystem module Tracing module Modules module DetermineIp class << self include ModuleApi::Loggable def [](data) return data.ip if data.ip return nil unless data.host && !data.host.empty? begin IPSocket.getaddress data.host rescue SocketError => e logger.info { "Error resolving #{data.host}: #{e.message}" } nil end end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems