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



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

def id
  @id ||= SecureRandom.uuid

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

  @id
end

.langObject



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

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

.lang_engineObject



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

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

.lang_interpreterObject



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

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

.lang_platformObject



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

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

.lang_versionObject



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

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

.tracer_versionObject



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

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