# Server

Site [llms.txt](/llms.txt)

---

## Server Attributes

**Attributes:**

| Key | Stability | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- |
| <a id="server-address" href="#server-address">`server.address`</a> | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name. [1] | `example.com`; `10.1.2.80`; `/tmp/my.sock` |
| <a id="server-as-number" href="#server-as-number">`server.as.number`</a> | ![Development](https://img.shields.io/badge/-development-blue) | int | The [Autonomous System Number (ASN)](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) associated with the server IP address. [2] | `64496`; `15169` |
| <a id="server-as-organization" href="#server-as-organization">`server.as.organization`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The name of the organization associated with the autonomous system of the server IP address. [3] | `Example Networks Inc.`; `Google LLC` |
| <a id="server-mac-address" href="#server-mac-address">`server.mac.address`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Server Media Access Control (MAC) address. [4] | `00-00-5E-00-53-23` |
| <a id="server-port" href="#server-port">`server.port`</a> | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | int | Server port number. [5] | `80`; `8080`; `443` |
| <a id="server-prefix" href="#server-prefix">`server.prefix`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | The IP prefix associated with the server IP address, in CIDR notation. [6] | `192.0.2.0/24`; `2001:db8::/32` |
| <a id="server-service-name" href="#server-service-name">`server.service.name`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Logical name of the service acting as the server in a connection-based network interaction. [7] | `payments` |
| <a id="server-service-namespace" href="#server-service-namespace">`server.service.namespace`</a> | ![Development](https://img.shields.io/badge/-development-blue) | string | Logical namespace of the service acting as the server in a connection-based network interaction. [8] | `Shop` |

**[1] `server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.

**[2] `server.as.number`:** This attribute SHOULD only be set when the server address is an IP address and the ASN is available from routing, enrichment, or lookup data. The value SHOULD be represented as an integer without the `AS` prefix.

**[3] `server.as.organization`:** This attribute SHOULD only be set when `server.as.number` is set and the organization name is available. The value SHOULD be the organization name as provided by the lookup or enrichment source, not the AS name or short code.

**[4] `server.mac.address`:** This attribute MUST identify a MAC address associated with the logical server
endpoint, including when that endpoint is behind intermediaries. If the server's
MAC address is unknown, this attribute MUST NOT be set. The MAC address of a
proxy, gateway, or next-hop router MUST NOT be used as a substitute.

MAC addresses MUST be represented in [IEEE RA hexadecimal form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf):
as hyphen-separated octets in uppercase hexadecimal form from most to least significant.

> [!WARNING]
>
> This attribute may contain sensitive (PII) information.

**[5] `server.port`:** When observed from the client side, and when communicating through an intermediary, `server.port` SHOULD represent the server port behind any intermediaries, for example proxies, if it's available.

**[6] `server.prefix`:**

> [!WARNING]
>
> This attribute may contain sensitive (PII) information. A `/32` IPv4 prefix
> or `/128` IPv6 prefix preserves the complete endpoint IP address.
> Using CIDR notation does not guarantee that the data is anonymous.

The value MUST be an IPv4 or IPv6 network prefix in CIDR notation, as defined in
[RFC 4632](https://www.rfc-editor.org/rfc/rfc4632.html) for IPv4 and
[RFC 4291](https://www.rfc-editor.org/rfc/rfc4291.html#section-2.3) for IPv6.
IPv4 prefixes MUST use a dotted-decimal address followed by `/` and a decimal
prefix length from 0 to 32. IPv6 prefixes MUST use the canonical address text
representation defined in [RFC 5952](https://www.rfc-editor.org/rfc/rfc5952.html),
followed by `/` and a decimal prefix length from 0 to 128. All host bits in
the address MUST be set to zero. The value MUST NOT contain a domain name,
UNIX domain socket name, or IPv6 zone identifier.

Instrumentation or Collector receivers that populate this attribute MUST
convert native representations, such as an address and subnet mask or an
address and prefix length, to equivalent CIDR notation before emitting it.

This attribute MUST NOT be set unless `server.address` is set to an IPv4 or
IPv6 address. The address MUST use the same IP version as this prefix and
be contained in it.

**[7] `server.service.name`:** SHOULD be equal to the actual [`service.name`](/docs/specs/semconv/resource/README.md#service) resource attribute of the logical server, if any. This identifies the server service whether the telemetry is recorded by the client, the server, or another observer.

**[8] `server.service.namespace`:** SHOULD be equal to the actual [`service.namespace`](/docs/specs/semconv/resource/README.md#service) resource attribute of the logical server, if any. This identifies the server service's namespace whether the telemetry is recorded by the client, the server, or another observer. Together with `server.service.name`, this identifies the server service. An empty namespace is equivalent to an unspecified namespace.
