Class: ElasticAPM::Metadata::SystemInfo Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/metadata/system_info.rb,
lib/elastic_apm/metadata/system_info/container_info.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.

Defined Under Namespace

Classes: ContainerInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ SystemInfo

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



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/elastic_apm/metadata/system_info.rb', line 7

def initialize(config)
  @config = config

  @hostname = @config.hostname || `hostname`.chomp
  @architecture = gem_platform.cpu
  @platform = gem_platform.os

  container_info = ContainerInfo.read!
  @container = container_info.container
  @kupernetes = container_info.kupernetes
end

Instance Attribute Details

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



19
20
21
# File 'lib/elastic_apm/metadata/system_info.rb', line 19

def architecture
  @architecture
end

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



19
20
21
# File 'lib/elastic_apm/metadata/system_info.rb', line 19

def container
  @container
end

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



19
20
21
# File 'lib/elastic_apm/metadata/system_info.rb', line 19

def hostname
  @hostname
end

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



19
20
21
# File 'lib/elastic_apm/metadata/system_info.rb', line 19

def kupernetes
  @kupernetes
end

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



19
20
21
# File 'lib/elastic_apm/metadata/system_info.rb', line 19

def platform
  @platform
end