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 point | Resource service.name | Span client.service.name | Span server.service.name |
|---|---|---|---|
| Client | shoppingcart | shoppingcart, if recorded | payments |
| Server | payments | shoppingcart | payments, 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:
These attributes may be used for any operation to store information about a thread that started a span.
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
thread.id | Recommended | int | Current “managed” thread ID (as opposed to OS thread ID). [1] | 42 | |
thread.name | Recommended | 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) |
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.
Feedback
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!