Sha256: 0ef05d9b347194e9f74fa2b1448a519149c01315fc6f40289b9f9ec8bbe19ae2

Contents?: true

Size: 1.65 KB

Versions: 19

Compression:

Stored size: 1.65 KB

Contents

# frozen_string_literal: true

require_relative '../../utils/hash'

module Datadog
  module Core
    module Telemetry
      module V1
        # Describes attributes for host object
        class Host
          using Core::Utils::Hash::Refinement

          attr_reader \
            :container_id,
            :hostname,
            :kernel_name,
            :kernel_release,
            :kernel_version,
            :os_version,
            :os

          # @param container_id [String] Docker container ID
          # @param hostname [String] uname -n
          # @param kernel_name [String] uname -s
          # @param kernel_release [String] uname -r
          # @param kernel_version [String] uname -v
          # @param os [String] uname -o
          # @param os_version [String] Version of OS running
          def initialize(
            container_id: nil, hostname: nil, kernel_name: nil, kernel_release: nil, kernel_version: nil,
            os_version: nil, os: nil
          )
            @container_id = container_id
            @hostname = hostname
            @kernel_name = kernel_name
            @kernel_release = kernel_release
            @kernel_version = kernel_version
            @os = os
            @os_version = os_version
          end

          def to_h
            hash = {
              container_id: @container_id,
              hostname: @hostname,
              kernel_name: @kernel_name,
              kernel_release: @kernel_release,
              kernel_version: @kernel_version,
              os: @os,
              os_version: @os_version,
            }
            hash.compact!
            hash
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
datadog-2.0.0.beta1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.21.1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.21.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.20.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.19.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.18.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.17.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.16.2 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.16.1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.16.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.15.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.14.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.13.1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.13.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.12.1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.12.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.11.1 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.11.0 lib/datadog/core/telemetry/v1/host.rb
ddtrace-1.11.0.beta1 lib/datadog/core/telemetry/v1/host.rb