Module: Datadog::Runtime::Identity

Defined in:
lib/ddtrace/runtime/identity.rb

Overview

For runtime identity

Class Method Summary collapse

Class Method Details

.idObject

Retrieves number of classes from runtime



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ddtrace/runtime/identity.rb', line 11

def id
  @pid ||= Process.pid
  @id ||= SecureRandom.uuid

  # Check if runtime has changed, e.g. forked.
  if Process.pid != @pid
    @pid = Process.pid
    @id = SecureRandom.uuid
  end

  @id
end

.langObject



24
25
26
# File 'lib/ddtrace/runtime/identity.rb', line 24

def lang
  Ext::Runtime::LANG
end

.lang_interpreterObject



28
29
30
# File 'lib/ddtrace/runtime/identity.rb', line 28

def lang_interpreter
  Ext::Runtime::LANG_INTERPRETER
end

.lang_versionObject



32
33
34
# File 'lib/ddtrace/runtime/identity.rb', line 32

def lang_version
  Ext::Runtime::LANG_VERSION
end

.tracer_versionObject



36
37
38
# File 'lib/ddtrace/runtime/identity.rb', line 36

def tracer_version
  Ext::Runtime::TRACER_VERSION
end