# http.* attributes: OpenTelemetry HTTP semantic conventions

> OpenTelemetry http.* attributes: http.request.method, http.response.status_code, http.route and the old names they replaced, such as http.method and http.url.

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


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

## Short answer

The `http.*` attributes describe one HTTP request: `http.request.method`, `http.response.status_code`, `http.route` on servers, and request and response headers when you opt in. The core ones are Stable. Older names such as `http.method`, `http.status_code` and `http.url` are deprecated, and `http.url` became `url.full`.

## What do the http.* attributes describe?

An HTTP client span is named `{method} {target}`, or just `{method}` when there is no low-cardinality target. The target is `url.template` on a client and `http.route` on a server. The URL path is never the default target.

A request with a method the instrumentation does not know gets `http.request.method` `_OTHER`, the real method in `http.request.method_original`, and the span name `HTTP`.

The address of the other side is not an `http.*` attribute: it is `server.address` and `server.port`, shared with RPC and GenAI spans.

## Which spans set them?

| Span name | Kind | Convention |
|---|---|---|
| `{method} {target}` | CLIENT | http.client |
| `{method} {target}` | SERVER | http.server |

## Why does my backend show http.method and http.url?

If it does, the spans come from instrumentation that writes the old names. They are listed under the deprecated attributes below, each with its replacement: `http.method` is now `http.request.method`, `http.status_code` is `http.response.status_code`, `http.url` is `url.full`.

If a dashboard has to work across both, query both names until every service is upgraded.

## All 12 `http.*` attributes

### `http.connection.state`

- Type: string
- Stability: Development
- State of the HTTP connection in the HTTP connection pool.
- Values: `active`, `idle`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-connection-state
- Link: https://hashspan.dev/learn/otel-attributes/http#http.connection.state

### `http.request.body.size`

- Type: int
- Stability: Development
- The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.
- Examples: `3495`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-body-size
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.body.size

### `http.request.header.<key>`

- Type: string[]
- Stability: Stable
- HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
- Examples: `["application/json"]`, `["1.2.3.4","1.2.3.5"]`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-header
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.header

### `http.request.method`

- Type: string
- Stability: Stable
- HTTP request method.
- Values: `CONNECT`, `DELETE`, `GET`, `HEAD`, `OPTIONS`, `PATCH`, `POST`, `PUT`, `TRACE`, `QUERY`, `_OTHER`
- Set on:
  - `{method} {target}` CLIENT: http.client (required)
  - `{method} {target}` SERVER: http.server (required)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-method
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.method

### `http.request.method_original`

- Type: string
- Stability: Stable
- Original HTTP method sent by the client in the request line.
- Examples: `GeT`, `ACL`, `foo`
- Set on:
  - `{method} {target}` CLIENT: http.client (conditionally required)
  - `{method} {target}` SERVER: http.server (conditionally required)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-method-original
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.method_original

### `http.request.resend_count`

- Type: int
- Stability: Stable
- The ordinal number of request resending attempt (for any reason, including redirects).
- Examples: `3`
- Set on:
  - `{method} {target}` CLIENT: http.client (recommended)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-resend-count
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.resend_count

### `http.request.size`

- Type: int
- Stability: Development
- The total size of the request in bytes. This should be the total number of bytes sent over the wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request body if any.
- Examples: `1437`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-size
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request.size

### `http.response.body.size`

- Type: int
- Stability: Development
- The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.
- Examples: `3495`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-body-size
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response.body.size

### `http.response.header.<key>`

- Type: string[]
- Stability: Stable
- HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.
- Examples: `["application/json"]`, `["abc","def"]`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-header
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response.header

### `http.response.size`

- Type: int
- Stability: Development
- The total size of the response in bytes. This should be the total number of bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and response body and trailers if any.
- Examples: `1437`
- Set on:
  - `{method} {target}` CLIENT: http.client (opt-in)
  - `{method} {target}` SERVER: http.server (opt-in)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-size
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response.size

### `http.response.status_code`

- Type: int
- Stability: Stable
- [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).
- Examples: `200`
- Set on:
  - `{method} {target}` CLIENT: http.client (conditionally required)
  - `{method} {target}` SERVER: http.server (conditionally required)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-status-code
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response.status_code

### `http.route`

- Type: string
- Stability: Stable
- The matched route template for the request. This MUST be low-cardinality and include all static path segments, with dynamic path segments represented with placeholders.
- Examples: `/users/:userID?`, `my-controller/my-action/{id?}`
- Set on:
  - `{method} {target}` SERVER: http.server (conditionally required)
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-route
- Link: https://hashspan.dev/learn/otel-attributes/http#http.route

## Which names were renamed or removed?

### `http.client_ip`

- Type: string
- Stability: Deprecated
- Renamed to `client.address`.
- Examples: `83.164.160.102`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-client-ip
- Link: https://hashspan.dev/learn/otel-attributes/http#http.client_ip

### `http.flavor`

- Type: string
- Stability: Deprecated
- Replaced by `network.protocol.name`.
- Values: `1.0`, `1.1`, `2.0`, `3.0`, `SPDY`, `QUIC`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-flavor
- Link: https://hashspan.dev/learn/otel-attributes/http#http.flavor

### `http.host`

- Type: string
- Stability: Deprecated
- Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.
- Examples: `www.example.org`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-host
- Link: https://hashspan.dev/learn/otel-attributes/http#http.host

### `http.method`

- Type: string
- Stability: Deprecated
- Renamed to `http.request.method`.
- Examples: `GET`, `POST`, `HEAD`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-method
- Link: https://hashspan.dev/learn/otel-attributes/http#http.method

### `http.request_content_length`

- Type: int
- Stability: Deprecated
- Replaced by `http.request.header.content-length`.
- Examples: `3495`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-content-length
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request_content_length

### `http.request_content_length_uncompressed`

- Type: int
- Stability: Deprecated
- Renamed to `http.request.body.size`.
- Examples: `5493`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-request-content-length-uncompressed
- Link: https://hashspan.dev/learn/otel-attributes/http#http.request_content_length_uncompressed

### `http.response_content_length`

- Type: int
- Stability: Deprecated
- Replaced by `http.response.header.content-length`.
- Examples: `3495`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-content-length
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response_content_length

### `http.response_content_length_uncompressed`

- Type: int
- Stability: Deprecated
- Renamed to `http.response.body.size`.
- Examples: `5493`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-response-content-length-uncompressed
- Link: https://hashspan.dev/learn/otel-attributes/http#http.response_content_length_uncompressed

### `http.scheme`

- Type: string
- Stability: Deprecated
- Renamed to `url.scheme`.
- Examples: `http`, `https`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-scheme
- Link: https://hashspan.dev/learn/otel-attributes/http#http.scheme

### `http.server_name`

- Type: string
- Stability: Deprecated
- Renamed to `server.address`.
- Examples: `example.com`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-server-name
- Link: https://hashspan.dev/learn/otel-attributes/http#http.server_name

### `http.status_code`

- Type: int
- Stability: Deprecated
- Renamed to `http.response.status_code`.
- Examples: `200`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-status-code
- Link: https://hashspan.dev/learn/otel-attributes/http#http.status_code

### `http.target`

- Type: string
- Stability: Deprecated
- Replaced by `url.path`.
- Examples: `/search?q=OpenTelemetry#SemConv`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-target
- Link: https://hashspan.dev/learn/otel-attributes/http#http.target

### `http.url`

- Type: string
- Stability: Deprecated
- Renamed to `url.full`.
- Examples: `https://www.foo.bar/search?q=OpenTelemetry#SemConv`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-url
- Link: https://hashspan.dev/learn/otel-attributes/http#http.url

### `http.user_agent`

- Type: string
- Stability: Deprecated
- Renamed to `user_agent.original`.
- Examples: `CERN-LineMode/2.15 libwww/2.17b3`, `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1`
- Official definition: https://opentelemetry.io/docs/specs/semconv/registry/attributes/http/#http-user-agent
- Link: https://hashspan.dev/learn/otel-attributes/http#http.user_agent

## FAQ

### Is a 404 response an error on the span?

On a client span, yes by default: a 4xx or 5xx status code SHOULD set the span status to Error. On a server span a 4xx MUST leave it unset, and only 5xx is an error. 1xx, 2xx and 3xx leave the status unset unless something else failed.

### What replaced http.url and http.target?

http.url became url.full. http.target was split into url.path and url.query.

## Read next

- [Span status and error.type](https://hashspan.dev/learn/otel-span-status)
- [Span kind: CLIENT, SERVER, INTERNAL](https://hashspan.dev/learn/otel-span-kind)
- [Context propagation across services](https://hashspan.dev/learn/otel-context-propagation)
- [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.
