Module: Datadog::Core::Environment::Identity

Defined in:
lib/datadog/core/environment/identity.rb

Overview

For runtime identity

Class Method Summary collapse

Class Method Details

.idObject

Retrieves number of classes from runtime



19
20
21
22
23
24
25
26
# File 'lib/datadog/core/environment/identity.rb', line 19

def id
  @id ||= ::SecureRandom.uuid.freeze

  # Check if runtime has changed, e.g. forked.
  after_fork! { @id = ::SecureRandom.uuid.freeze }

  @id
end

.langObject



32
33
34
# File 'lib/datadog/core/environment/identity.rb', line 32

def lang
  Core::Environment::Ext::LANG
end

.lang_engineObject



36
37
38
# File 'lib/datadog/core/environment/identity.rb', line 36

def lang_engine
  Core::Environment::Ext::LANG_ENGINE
end

.lang_interpreterObject



40
41
42
# File 'lib/datadog/core/environment/identity.rb', line 40

def lang_interpreter
  Core::Environment::Ext::LANG_INTERPRETER
end

.lang_platformObject



44
45
46
# File 'lib/datadog/core/environment/identity.rb', line 44

def lang_platform
  Core::Environment::Ext::LANG_PLATFORM
end

.lang_versionObject



48
49
50
# File 'lib/datadog/core/environment/identity.rb', line 48

def lang_version
  Core::Environment::Ext::LANG_VERSION
end

.pidObject



28
29
30
# File 'lib/datadog/core/environment/identity.rb', line 28

def pid
  ::Process.pid
end

.tracer_versionObject



52
53
54
# File 'lib/datadog/core/environment/identity.rb', line 52

def tracer_version
  Core::Environment::Ext::TRACER_VERSION
end