Class: ElasticAPM::Metadata::SystemInfo Private
- Inherits:
-
Object
- Object
- ElasticAPM::Metadata::SystemInfo
- 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
- #architecture ⇒ Object readonly private
- #configured_hostname ⇒ Object readonly private
- #container ⇒ Object readonly private
- #detected_hostname ⇒ Object readonly private
- #kubernetes ⇒ Object readonly private
- #platform ⇒ Object readonly private
Instance Method Summary collapse
- #gem_platform ⇒ Object private
-
#initialize(config) ⇒ SystemInfo
constructor
private
A new instance of SystemInfo.
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.
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 24 def initialize(config) @config = config @configured_hostname = @config.hostname @detected_hostname = detect_hostname @architecture = gem_platform.cpu @platform = gem_platform.os container_info = ContainerInfo.read!(@detected_hostname) @container = container_info.container @kubernetes = container_info.kubernetes end |
Instance Attribute Details
#architecture ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def architecture @architecture end |
#configured_hostname ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def configured_hostname @configured_hostname end |
#container ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def container @container end |
#detected_hostname ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def detected_hostname @detected_hostname end |
#kubernetes ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def kubernetes @kubernetes end |
#platform ⇒ Object (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.
37 38 39 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 37 def platform @platform end |
Instance Method Details
#gem_platform ⇒ Object
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.
46 47 48 |
# File 'lib/elastic_apm/metadata/system_info.rb', line 46 def gem_platform @gem_platform ||= Gem::Platform.local end |