Skip to content

Commit

Permalink
rebase and merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Apr 19, 2022
2 parents 863cfbd + 06cd3b2 commit 8607598
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions specification/trace/semantic_conventions/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Following attributes MUST be provided **at span creation time** (when provided a
* `http.method`
<!-- endsemconv -->

It is recommended to also use the general [network attributes][], especially `net.peer.ip`. If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.
It is recommended to also use the general [network attributes][], especially `net.peer.ip`. If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. See [client](#http-client) and [server](#http-server) sections for more details.

### HTTP request and response headers

Expand Down Expand Up @@ -134,8 +134,8 @@ before any HTTP-redirects that may happen when executing the request.
| `http.url` | string | Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment]. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. [1] | `https://www.example.com/search?q=OpenTelemetry#SemConv` | Yes |
| [`net.peer.name`](span-general.md) | string | Best known remote hostname or similar, see note below. [1] | `example.com` | Yes |
| [`net.peer.port`](span-general.md) | int | Remote port number. | `80`; `8080`; `443` | Yes, if not default. |
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Opt-out |
| `http.retry_count` | int | The ordinal number of request re-sending attempt. | `3` | Opt-out. If and only if a request was retried. |
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). | `127.0.0.1` | Opt-out, if readily available |
| `http.retry_count` | int | The ordinal number of request re-sending attempt. First retry (the seconds attempt) should be reported with count `1` | `3` | Opt-out. If and only if a request was retried. |

**[1]:** `net.peer.name` Best known HTTP remote hostname is identified according with the following order:

Expand Down Expand Up @@ -223,7 +223,7 @@ If the route cannot be determined, the `name` attribute MUST be set as defined i
| `http.scheme` | string | URL scheme component. | `http` or `https` | Yes |
| [`net.host.name`](span-general.md) | string | The best known HTTP server name, see note [1] below | `example.com` | Yes |
| [`net.host.port`](span-general.md) | string | Local port number. | `80`; `8080`; `443` | Yes, if not default |
| `http.route` | string | The matched route (path template in HTTP server framework-specific format). See note [2] below | `/users/:userID?`, `{controller}/{action}/{id?}` | Yes |
| `http.route` | string | The matched route (path template in the format used by the respective server framework). See note [2] below | `/users/:userID?`, `{controller}/{action}/{id?}` | Yes |
| `http.target` | string | The full request target as passed in a HTTP request line or equivalent. | `/path/12314/?q=ddds#12` | Yes |
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | Opt-out |
| [`net.peer.port`](span-general.md) | int | Remote port number. | `49280`; `52197`; `51059` | Opt-out |
Expand All @@ -237,7 +237,7 @@ If the route cannot be determined, the `name` attribute MUST be set as defined i
- Host component of request URL
- Server IP address

*[2]:** MUST NOT populate `http.route` when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
**[2]:** MUST NOT populate `http.route` when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.

**[3]:** This is not necessarily the same as `net.peer.ip`, which would
identify the network-level peer, which may be a proxy.
Expand Down

0 comments on commit 8607598

Please sign in to comment.