Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.44 KB

File metadata and controls

36 lines (27 loc) · 1.44 KB

Thread

Thread Attributes

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

Attributes:

Key Stability Value Type Description Example Values
thread.id Development int Current "managed" thread ID (as opposed to OS thread ID). [1] 42
thread.name Development string Current thread name. [2] main

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

Language or platform Source
JVM Thread.currentThread().threadId()
.NET Thread.CurrentThread.ManagedThreadId
Python threading.current_thread().ident
Ruby Thread.current.object_id
C++ std::this_thread::get_id()
Erlang erlang:self()

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

Language or platform Source
JVM Thread.currentThread().getName()
.NET Thread.CurrentThread.Name
Python threading.current_thread().name
Ruby Thread.current.name
Erlang erlang:process_info(self(), registered_name)