Sha256: dcdecf5ec0c2689b787a5f80f7b09f21c1985f15cb5c73b2bde826eb0f7b4d31

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

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

    attr_reader :config

    def build
      {
        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

2 entries across 2 versions & 1 rubygems

Version Path
elastic-apm-0.2.0 lib/elastic_apm/system_info.rb
elastic-apm-0.1.0 lib/elastic_apm/system_info.rb