server.address and server.port: OpenTelemetry attributes

From semantic-conventions v1.44.0 (e10a930)Synced View as MarkdownOpen in ClaudeOpen in ChatGPT

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?

Every span in the conventions that references at least one of these attributes, with the span name it should get and its kind.

  • {method} {target}CLIENThttp.client
  • {method} {target}SERVERhttp.server
  • {rpc.method}CLIENTrpc.call.client
  • {rpc.method}SERVERrpc.call.server
  • {rpc.method}CLIENTrpc.connect_rpc.call.client
  • {rpc.method}SERVERrpc.connect_rpc.call.server
  • {rpc.method}CLIENTrpc.grpc.call.client
  • {rpc.method}SERVERrpc.grpc.call.server
  • {rpc.method}CLIENTrpc.jsonrpc.call.client
  • {rpc.method}SERVERrpc.jsonrpc.call.server
  • {rpc.method}CLIENTrpc.dubbo.call.client
  • {rpc.method}SERVERrpc.dubbo.call.server
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTgen_ai.client.inference
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTgen_ai.embeddings.client
  • {gen_ai.operation.name} {gen_ai.data_source.id}CLIENTgen_ai.retrieval.client
  • {gen_ai.operation.name}CLIENTgen_ai.fetch_response.client
  • {gen_ai.operation.name}CLIENTgen_ai.memory.client
  • create_agent {gen_ai.agent.name}CLIENTgen_ai.create_agent.client
  • invoke_agent {gen_ai.agent.name}CLIENTgen_ai.invoke_agent.client
  • {mcp.method.name}CLIENTmcp.client
  • {mcp.method.name}SERVERmcp.server
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTopenai.gen_ai.client.inference (refines gen_ai.client.inference)
  • {gen_ai.operation.name}CLIENTopenai.fetch_response.client (refines gen_ai.fetch_response.client)
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTazure.ai.gen_ai.client.inference (refines gen_ai.client.inference)
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTanthropic.gen_ai.client.inference (refines gen_ai.client.inference)
  • {gen_ai.operation.name} {gen_ai.request.model}CLIENTaws.bedrock.gen_ai.client.inference (refines gen_ai.client.inference)

What does a real span record?

eth_fillTransactionCLIENT
AttributeValue
server.address127.0.0.1
server.port8545
rpc.system.namejsonrpc
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.

All 2 server.* attributes

server.address

stringStable

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

server.port

intStable

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

All 2 client.* attributes

client.address

stringStable

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

client.port

intStable

Client port number.

Examples 65123

Set on
  • {method} {target} SERVER: http.server (opt-in)
  • {mcp.method.name} SERVER: mcp.server (recommended)

Official definition

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.

Attribute names, types, stability and descriptions are from the OpenTelemetry semantic conventions (open-telemetry/semantic-conventions), © OpenTelemetry Authors, Apache-2.0. Each attribute links to its official definition, which wins where the two differ.

Something wrong or out of date? Report a problem with this page.

Type to search the docs, Learn topics and the blog.