General attributes

Status: Development

The attributes described in this section are not specific to a particular operation but rather generic. They may be used in any Span they apply to. Particular operations may refer to or require some of these attributes.

Network attributes

Network communication is described by several families of attributes: client.* / server.*, source.* / destination.*, and network.local.* / network.peer.*. Their definitions live in the attribute registry:

For help choosing among these families, see Choosing network address and port attributes.

General remote service attributes

Service identities

The resource’s service.name and service.namespace identify the service producing the telemetry. The client.service.* and server.service.* attributes identify the services participating in the interaction, using the same logical roles as client.address and server.address. An observer can record both the client and server service identities on the same signal.

For example, when shoppingcart calls payments:

Observation pointResource service.nameSpan client.service.nameSpan server.service.name
Clientshoppingcartshoppingcart, if recordedpayments
Serverpaymentsshoppingcartpayments, if recorded

The local service identity is already available on the resource, so recording it again on the span is usually unnecessary.

Service identity attributes are included in the client and server attribute groups.

General thread attributes

Status: Development

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

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
thread.idDevelopmentRecommendedintCurrent “managed” thread ID (as opposed to OS thread ID). [1]42
thread.nameDevelopmentRecommendedstringCurrent 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)

Source code attributes

Status: Release Candidate

Often a span is closely tied to a certain unit of code that is logically responsible for handling the operation that the span describes (usually the method that starts the span). For an HTTP server span, this would be the function that handles the incoming request, for example. The code attributes allow to report this unit of code and therefore to provide more context.