Class: BaselineRedRpm::Tracing::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/baseline_red_rpm/tracing/endpoint.rb

Constant Summary collapse

LOCAL_IP =
(
  Socket.ip_address_list.detect(&:ipv4_private?) ||
  Socket.ip_address_list.reverse.detect(&:ipv4?)
).ip_address

Class Method Summary collapse

Class Method Details

.local_endpoint(service_name) ⇒ Object



13
14
15
16
17
18
# File 'lib/baseline_red_rpm/tracing/endpoint.rb', line 13

def self.local_endpoint(service_name)
  {
    "serviceName" => service_name,
    "ipv4" => LOCAL_IP
  }
end