Sha256: 58c52b6f30eec6a107e762b9dd6e6e22323e9fbea740570cf55df805290724fc

Contents?: true

Size: 447 Bytes

Versions: 15

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

module ElasticAPM
  # @api private
  class SystemInfo
    def initialize(config)
      @config = config
    end

    def build
      {
        hostname: @config.hostname || `hostname`,
        architecture: platform.cpu,
        platform: platform.os
      }
    end

    def self.build(config)
      new(config).build
    end

    private

    def platform
      @platform ||= Gem::Platform.local
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
elastic-apm-0.7.4 lib/elastic_apm/system_info.rb
elastic-apm-0.7.3 lib/elastic_apm/system_info.rb
elastic-apm-0.7.2 lib/elastic_apm/system_info.rb
elastic-apm-0.7.1 lib/elastic_apm/system_info.rb
elastic-apm-0.7.0 lib/elastic_apm/system_info.rb
elastic-apm-0.6.2 lib/elastic_apm/system_info.rb
elastic-apm-0.6.1 lib/elastic_apm/system_info.rb
elastic-apm-0.5.1 lib/elastic_apm/system_info.rb
elastic-apm-0.5.0 lib/elastic_apm/system_info.rb
elastic-apm-0.4.5 lib/elastic_apm/system_info.rb
elastic-apm-0.4.4 lib/elastic_apm/system_info.rb
elastic-apm-0.4.3 lib/elastic_apm/system_info.rb
elastic-apm-0.4.2 lib/elastic_apm/system_info.rb
elastic-apm-0.4.1 lib/elastic_apm/system_info.rb
elastic-apm-0.4.0 lib/elastic_apm/system_info.rb