Thread

Thread Attributes

These attributes may be used for any operation to store information about a thread that started a span.

Attributes:

KeyStabilityValue TypeDescriptionExample Values
thread.idDevelopmentintCurrent “managed” thread ID (as opposed to OS thread ID). [1]42
thread.nameDevelopmentstringCurrent thread name. [2]main

[1] thread.id: Examples of where the value can be extracted from:

Language or platformSource
JVMThread.currentThread().threadId()
.NETThread.CurrentThread.ManagedThreadId
Pythonthreading.current_thread().ident
RubyThread.current.object_id
C++std::this_thread::get_id()
Erlangerlang:self()

[2] thread.name: Examples of where the value can be extracted from:

Language or platformSource
JVMThread.currentThread().getName()
.NETThread.CurrentThread.Name
Pythonthreading.current_thread().name
RubyThread.current.name
Erlangerlang:process_info(self(), registered_name)