Skip to content

Commit

Permalink
review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 19, 2022
1 parent 914ca73 commit eb835be
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions semantic_conventions/trace/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ groups:
type: string
brief: Remote socket peer name.
requirement_level:
recommended: If available and different than `net.peer.name` and if `net.sock.peer.addr` is set.
recommended: If available and different from `net.peer.name` and if `net.sock.peer.addr` is set.
examples: proxy.example.com
- id: sock.peer.addr
type: string
Expand Down Expand Up @@ -73,9 +73,9 @@ groups:
requirement_level:
conditionally_required: >
If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set.
Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr`
without `net.sock.family` coming from instrumentations that follow previous versions
of this document.
Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr`
if `net.sock.family` is not set. This is to support instrumentations that follow previous versions
of this document.
brief: >
Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication.
examples: ['inet6', 'bluetooth']
Expand Down
1 change: 1 addition & 0 deletions semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ groups:
- ref: net.sock.peer.port
- ref: net.sock.peer.name
- ref: net.sock.family
examples: ['inet', 'inet6']
constraints:
- include: network

Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Some database systems may allow a connection to switch to a different `db.user`,

**[2]:** If using a port other than the default port for this DBMS and if `net.peer.name` is set.

**[3]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr` without `net.sock.family` coming from instrumentations that follow previous versions of this document.
**[3]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document.

**[4]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set.

Expand Down
8 changes: 4 additions & 4 deletions specification/trace/semantic_conventions/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ Don't set the span status description if the reason can be inferred from `http.s
| `http.user_agent` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3` | Recommended |
| `http.request_content_length` | int | 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. | `3495` | Recommended |
| `http.response_content_length` | int | 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. | `3495` | Recommended |
| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet6`; `bluetooth` | Conditionally Required: [2] |
| [`net.sock.family`](span-general.md) | string | Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication. | `inet`; `inet6` | Conditionally Required: [2] |
| [`net.sock.peer.addr`](span-general.md) | string | Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication, [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). | `127.0.0.1`; `/tmp/mysql.sock` | Recommended |
| [`net.sock.peer.name`](span-general.md) | string | Remote socket peer name. | `proxy.example.com` | Recommended: [3] |
| [`net.sock.peer.port`](span-general.md) | int | Remote socket peer port. | `16456` | Recommended: [4] |

**[1]:** 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.

**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr` without `net.sock.family` coming from instrumentations that follow previous versions of this document.
**[2]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document.

**[3]:** If available and different than `net.peer.name` and if `net.sock.peer.addr` is set.
**[3]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set.

**[4]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set.

Expand Down Expand Up @@ -110,7 +110,7 @@ It is recommended to also use the general [socket-level attributes][] - `net.soc
**[1]:** Instrumentations SHOULD require an explicit configuration of which headers are to be captured.
Including all request/response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.

Some HTTP headers - `User-Agent` - is already captured in the `http.user_agent` attributes.
The `User-Agent` header is already captured in the `http.user_agent` attribute.
Users MAY explicitly configure instrumentations to capture them even though it is not recommended.

**[2]:** The attribute value MUST consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.
Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ The following operations related to messages are defined for these semantic conv

**[3]:** This should be the IP/hostname of the broker (or other network-level peer) this specific message is sent to/received from.

**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr` without `net.sock.family` coming from instrumentations that follow previous versions of this document.
**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document.

**[5]:** If different than `net.peer.name` and if `net.sock.peer.addr` is set.

Expand Down
2 changes: 1 addition & 1 deletion specification/trace/semantic_conventions/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Generally, a user SHOULD NOT set `peer.service` to a fully qualified RPC service
| [`net.sock.host.addr`](span-general.md) | string | Local socket address. Useful in case of a multi-IP host.' | `192.168.0.1` | Recommended |
| [`net.sock.host.port`](span-general.md) | int | Local socket port number. | `35555` | Recommended: [2] |

**[1]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr` without `net.sock.family` coming from instrumentations that follow previous versions of this document.
**[1]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document.

**[2]:** If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set.
<!-- endsemconv -->
Expand Down
4 changes: 2 additions & 2 deletions specification/trace/semantic_conventions/span-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ the `net.peer.*` properties of a client are equal to the `net.host.*` properties

**[1]:** `net.app.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.

**[2]:** If available and different than `net.peer.name` and if `net.sock.peer.addr` is set.
**[2]:** If available and different from `net.peer.name` and if `net.sock.peer.addr` is set.

**[3]:** If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set.

**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD expect to receive IPv6 address in `net.sock.peer.addr` without `net.sock.family` coming from instrumentations that follow previous versions of this document.
**[4]:** If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr` if `net.sock.family` is not set. This is to support instrumentations that follow previous versions of this document.

**[5]:** `net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup.

Expand Down

0 comments on commit eb835be

Please sign in to comment.