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

Extended by:
Utils::Forking
Defined in:
lib/datadog/core/environment/identity.rb

Overview

For runtime identity

Class Method Summary collapse

Methods included from Utils::Forking

after_fork!, extended, fork_pid, forked?, included, update_fork_pid!

Class Method Details

.idObject

Retrieves number of classes from runtime



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

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

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

  @id
end

.langObject



30
31
32
# File 'lib/datadog/core/environment/identity.rb', line 30

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

.lang_engineObject



34
35
36
# File 'lib/datadog/core/environment/identity.rb', line 34

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

.lang_interpreterObject



38
39
40
# File 'lib/datadog/core/environment/identity.rb', line 38

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

.lang_platformObject



42
43
44
# File 'lib/datadog/core/environment/identity.rb', line 42

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

.lang_versionObject



46
47
48
# File 'lib/datadog/core/environment/identity.rb', line 46

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

.pidObject



26
27
28
# File 'lib/datadog/core/environment/identity.rb', line 26

def pid
  ::Process.pid
end

.tracer_versionObject



50
51
52
# File 'lib/datadog/core/environment/identity.rb', line 50

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