Sha256: 08eacaf2a0c3763e1e4ef7c4f0fc9ee781d2a9ad830f694e4a3caf164e59e0a8

Contents?: true

Size: 1.42 KB

Versions: 17

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

require_relative '../../../ddtrace/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'

        # TODO: Migrate to Datadog::Tracing
        TRACER_VERSION = DDTrace::VERSION::STRING
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ddtrace-1.23.3 lib/datadog/core/environment/ext.rb
ddtrace-1.23.2 lib/datadog/core/environment/ext.rb
ddtrace-1.23.1 lib/datadog/core/environment/ext.rb
ddtrace-1.22.0 lib/datadog/core/environment/ext.rb
ddtrace-1.21.1 lib/datadog/core/environment/ext.rb
ddtrace-1.21.0 lib/datadog/core/environment/ext.rb
ddtrace-1.20.0 lib/datadog/core/environment/ext.rb
ddtrace-1.19.0 lib/datadog/core/environment/ext.rb
ddtrace-1.18.0 lib/datadog/core/environment/ext.rb
ddtrace-1.17.0 lib/datadog/core/environment/ext.rb
ddtrace-1.16.2 lib/datadog/core/environment/ext.rb
ddtrace-1.16.1 lib/datadog/core/environment/ext.rb
ddtrace-1.16.0 lib/datadog/core/environment/ext.rb
ddtrace-1.15.0 lib/datadog/core/environment/ext.rb
ddtrace-1.14.0 lib/datadog/core/environment/ext.rb
ddtrace-1.13.1 lib/datadog/core/environment/ext.rb
ddtrace-1.13.0 lib/datadog/core/environment/ext.rb