BREAKING: Replace `net.peer.*`/`net.host.*` with `client.*`/`server.*` (and `source.*`/`destination.*`) (#3402)

This commit is contained in:
Liudmila Molkova 2023-05-08 16:19:51 -07:00 committed by Josh Suereth
parent 079ef0c249
commit 3d4e7b452a
1 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ All instrumentations MUST populate the attribute when the given condition is sat
When a `Conditionally Required` attribute's condition is not satisfied, and there is no requirement to populate the attribute, semantic conventions MAY provide special instructions on how to handle it. If no instructions are given and if instrumentation can populate the attribute, instrumentation SHOULD use the `Opt-In` requirement level on the attribute. When a `Conditionally Required` attribute's condition is not satisfied, and there is no requirement to populate the attribute, semantic conventions MAY provide special instructions on how to handle it. If no instructions are given and if instrumentation can populate the attribute, instrumentation SHOULD use the `Opt-In` requirement level on the attribute.
For example, `net.peer.name` is `Conditionally Required` by the [Database convention](../trace/semantic_conventions/database.md) when available. When `net.sock.peer.addr` is available instead, instrumentation can do a DNS lookup, cache and populate `net.peer.name`, but only if the user explicitly enables the instrumentation to do so, considering the performance issues that DNS lookups introduce. For example, `server.address` is `Conditionally Required` by the [Database convention](../trace/semantic_conventions/database.md) when available. When `server.socket.address` is available instead, instrumentation can do a DNS lookup, cache and populate `server.address`, but only if the user explicitly enables the instrumentation to do so, considering the performance issues that DNS lookups introduce.
## Recommended ## Recommended
@ -69,6 +69,6 @@ This attribute requirement level is recommended for attributes that are particul
Here are several examples of expensive operations to be avoided by default: Here are several examples of expensive operations to be avoided by default:
- DNS lookups to populate `net.peer.name` when only an IP address is available to the instrumentation. Caching lookup results does not solve the issue for all possible cases and should be avoided by default too. - DNS lookups to populate `server.address` when only an IP address is available to the instrumentation. Caching lookup results does not solve the issue for all possible cases and should be avoided by default too.
- forcing an `http.route` calculation before the HTTP framework calculates it - forcing an `http.route` calculation before the HTTP framework calculates it
- reading response stream to find `http.response_content_length` when `Content-Length` header is not available - reading response stream to find `http.response_content_length` when `Content-Length` header is not available