Sha256: 46d9653d46fd6d170d6ea7dddcc7e1f9b3a975aca9e663def2ef033f6720dc72

Contents?: true

Size: 1.38 KB

Versions: 3

Compression:

Stored size: 1.38 KB

Contents

# frozen_string_literal: true

require_relative '../../../datadog/version'

module Datadog
  module Core
    module Environment
      # @public_api Changing resource names, tag names, or environment variables creates breaking changes.
      module Ext
        # e.g for CRuby '3.0.1', for JRuby '9.2.19.0', for TruffleRuby '21.1.0'
        ENGINE_VERSION = if defined?(RUBY_ENGINE_VERSION)
                           RUBY_ENGINE_VERSION
                         else
                           # CRuby < 2.3 doesn't support RUBY_ENGINE_VERSION
                           RUBY_VERSION
                         end

        ENV_API_KEY = 'DD_API_KEY'
        ENV_ENVIRONMENT = 'DD_ENV'
        ENV_SERVICE = 'DD_SERVICE'
        ENV_SITE = 'DD_SITE'
        ENV_TAGS = 'DD_TAGS'
        ENV_VERSION = 'DD_VERSION'
        FALLBACK_SERVICE_NAME =
          begin
            File.basename($PROGRAM_NAME, '.*')
          rescue StandardError
            'ruby'
          end.freeze

        LANG = 'ruby'
        LANG_ENGINE = RUBY_ENGINE
        LANG_INTERPRETER = "#{RUBY_ENGINE}-#{RUBY_PLATFORM}"
        LANG_PLATFORM = RUBY_PLATFORM
        LANG_VERSION = RUBY_VERSION
        RUBY_ENGINE = ::RUBY_ENGINE # e.g. 'ruby', 'jruby', 'truffleruby'
        TAG_ENV = 'env'
        TAG_SERVICE = 'service'
        TAG_VERSION = 'version'

        GEM_DATADOG_VERSION = Datadog::VERSION::STRING
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
datadog-2.0.0 lib/datadog/core/environment/ext.rb
datadog-2.0.0.beta2 lib/datadog/core/environment/ext.rb
datadog-2.0.0.beta1 lib/datadog/core/environment/ext.rb