# server.address and server.port: OpenTelemetry attributes

> OpenTelemetry server.address, server.port, client.address and client.port: what each side records, which HTTP, RPC and GenAI spans use them.

Source: https://hashspan.dev/learn/otel-attributes/server


From semantic-conventions v1.44.0 (e10a930). Synced 2026-10-18.

## Short answer

`server.address` and `server.port` name the server a request went to, `client.address` and `client.port` the client it came from. All four are Stable. HTTP, RPC, GenAI and MCP spans share them instead of each defining its own host attribute.

## What do the server.* and client.* attributes describe?

From the client side, `server.address` is the host you called: a domain name if you have one, without a reverse DNS lookup, otherwise an IP address or socket name. Behind a proxy, it should be the server behind the proxy when that is known.

The same two attributes appear on an HTTP request, a gRPC call, a JSON-RPC call to an Ethereum node and a model call. One query on `server.address` finds them all.

## Which spans set them?

| Span name | Kind | Convention |
|---|---|---|
| `{method} {target}` | CLIENT | http.client |
| `{method} {target}` | SERVER | http.server |
| `{rpc.method}` | CLIENT | rpc.call.client |
| `{rpc.method}` | SERVER | rpc.call.server |
| `{rpc.method}` | CLIENT | rpc.connect_rpc.call.client |
| `{rpc.method}` | SERVER | rpc.connect_rpc.call.server |
| `{rpc.method}` | CLIENT | rpc.grpc.call.client |
| `{rpc.method}` | SERVER | rpc.grpc.call.server |
| `{rpc.method}` | CLIENT | rpc.jsonrpc.call.client |
| `{rpc.method}` | SERVER | rpc.jsonrpc.call.server |
| `{rpc.method}` | CLIENT | rpc.dubbo.call.client |
| `{rpc.method}` | SERVER | rpc.dubbo.call.server |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | gen_ai.client.inference |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | gen_ai.embeddings.client |
| `{gen_ai.operation.name} {gen_ai.data_source.id}` | CLIENT | gen_ai.retrieval.client |
| `{gen_ai.operation.name}` | CLIENT | gen_ai.fetch_response.client |
| `{gen_ai.operation.name}` | CLIENT | gen_ai.memory.client |
| `create_agent {gen_ai.agent.name}` | CLIENT | gen_ai.create_agent.client |
| `invoke_agent {gen_ai.agent.name}` | CLIENT | gen_ai.invoke_agent.client |
| `{mcp.method.name}` | CLIENT | mcp.client |
| `{mcp.method.name}` | SERVER | mcp.server |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | openai.gen_ai.client.inference (refines gen_ai.client.inference) |
| `{gen_ai.operation.name}` | CLIENT | openai.fetch_response.client (refines gen_ai.fetch_response.client) |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | azure.ai.gen_ai.client.inference (refines gen_ai.client.inference) |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | anthropic.gen_ai.client.inference (refines gen_ai.client.inference) |
| `{gen_ai.operation.name} {gen_ai.request.model}` | CLIENT | aws.bedrock.gen_ai.client.inference (refines gen_ai.client.inference) |

## What does a real span record?

Span `eth_fillTransaction` (CLIENT):

| Attribute | Value |
|---|---|
| `server.address` | `127.0.0.1` |
| `server.port` | `8545` |
| `rpc.system.name` | `jsonrpc` |

From a real run on 2026-10-18: `@hashspan/viem` 1.1.1 with viem 2.57.7 against a local Anvil node on port 8545. [The page this run is from](https://hashspan.dev/docs/viem-opentelemetry).

## All 2 `server.*` attributes

### `server.address`

- Type: string
- Stability: Stable
- Server domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.
- Examples: `example.com`, `10.1.2.80`, `/tmp/my.sock`
- Set on:
  - `{method} {target}` CLIENT: http.client (required)
  - `{method} {target}` SERVER: http.server (recommended)
  - `{rpc.method}` CLIENT: rpc.call.client (conditionally required), rpc.connect_rpc.call.client (required), rpc.grpc.call.client (required), rpc.jsonrpc.call.client (conditionally required), rpc.dubbo.call.client (conditionally required)
  - `{rpc.method}` SERVER: rpc.call.server (conditionally required), rpc.connect_rpc.call.server (conditionally required), rpc.grpc.call.server (conditionally required), rpc.jsonrpc.call.server (conditionally required), rpc.dubbo.call.server (conditionally required)
  - `{gen_ai.operation.name} {gen_ai.request.model}` CLIENT: gen_ai.client.inference (recommended), gen_ai.embeddings.client (recommended), openai.gen_ai.client.inference (recommended), azure.ai.gen_ai.client.inference (recommended), anthropic.gen_ai.client.inference (recommended), aws.bedrock.gen_ai.client.inference (recommended)
  - `{gen_ai.operation.name} {gen_ai.data_source.id}` CLIENT: gen_ai.retrieval.client (recommended)
  - `{gen_ai.operation.name}` CLIENT: gen_ai.fetch_response.client (recommended), gen_ai.memory.client (recommended), openai.fetch_response.client (recommended)
  - `create_agent {gen_ai.agent.name}` CLIENT: gen_ai.create_agent.client (recommended)
  - `invoke_agent {gen_ai.agent.name}` CLIENT: gen_ai.invoke_agent.client (recommended)
  - `{mcp.method.name}` CLIENT: mcp.client (recommended)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/server/#server-address
- Link: https://hashspan.dev/learn/otel-attributes/server#server.address

### `server.port`

- Type: int
- Stability: Stable
- Server port number.
- Examples: `80`, `8080`, `443`
- Set on:
  - `{method} {target}` CLIENT: http.client (required)
  - `{method} {target}` SERVER: http.server (conditionally required)
  - `{rpc.method}` CLIENT: rpc.call.client (conditionally required), rpc.connect_rpc.call.client (conditionally required), rpc.grpc.call.client (conditionally required), rpc.jsonrpc.call.client (conditionally required), rpc.dubbo.call.client (conditionally required)
  - `{rpc.method}` SERVER: rpc.call.server (conditionally required), rpc.connect_rpc.call.server (conditionally required), rpc.grpc.call.server (conditionally required), rpc.jsonrpc.call.server (conditionally required), rpc.dubbo.call.server (conditionally required)
  - `{gen_ai.operation.name} {gen_ai.request.model}` CLIENT: gen_ai.client.inference (conditionally required), gen_ai.embeddings.client (conditionally required), openai.gen_ai.client.inference (conditionally required), azure.ai.gen_ai.client.inference (conditionally required), anthropic.gen_ai.client.inference (conditionally required), aws.bedrock.gen_ai.client.inference (conditionally required)
  - `{gen_ai.operation.name} {gen_ai.data_source.id}` CLIENT: gen_ai.retrieval.client (conditionally required)
  - `{gen_ai.operation.name}` CLIENT: gen_ai.fetch_response.client (conditionally required), gen_ai.memory.client (conditionally required), openai.fetch_response.client (conditionally required)
  - `create_agent {gen_ai.agent.name}` CLIENT: gen_ai.create_agent.client (conditionally required)
  - `invoke_agent {gen_ai.agent.name}` CLIENT: gen_ai.invoke_agent.client (conditionally required)
  - `{mcp.method.name}` CLIENT: mcp.client (recommended)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/server/#server-port
- Link: https://hashspan.dev/learn/otel-attributes/server#server.port

## All 2 `client.*` attributes

### `client.address`

- Type: string
- Stability: Stable
- Client address - domain name if available without reverse DNS lookup; otherwise, IP address or UNIX domain socket name.
- Examples: `client.example.com`, `10.1.2.80`, `/tmp/my.sock`
- Set on:
  - `{method} {target}` SERVER: http.server (recommended)
  - `{mcp.method.name}` SERVER: mcp.server (recommended)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/client/#client-address
- Link: https://hashspan.dev/learn/otel-attributes/server#client.address

### `client.port`

- Type: int
- Stability: Stable
- Client port number.
- Examples: `65123`
- Set on:
  - `{method} {target}` SERVER: http.server (opt-in)
  - `{mcp.method.name}` SERVER: mcp.server (recommended)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/client/#client-port
- Link: https://hashspan.dev/learn/otel-attributes/server#client.port

## FAQ

### What replaced http.server_name and http.client_ip?

http.server_name was renamed to server.address, and http.client_ip to client.address. http.host has no single replacement: it becomes server.address, client.address or the http.request.header.host header, depending on the side.

## Read next

- [Resource attributes: who sent the span](https://hashspan.dev/learn/otel-resource-attributes)
- [Span attributes](https://hashspan.dev/learn/otel-span-attributes)
- [Span kind: CLIENT, SERVER, INTERNAL](https://hashspan.dev/learn/otel-span-kind)
- [Search every attribute](https://hashspan.dev/learn/otel-attributes.md)

Attribute names, types, stability and descriptions are from the OpenTelemetry semantic conventions, © OpenTelemetry Authors, Apache-2.0.
