Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename/replace (client|server).socket.(address|port) attributes with network.(peer|local).(address|port). #3713

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ release.

### Common

- Rename/replace `(client|server).socket.(address|port)` attributes with `network.(peer|local).(address|port)`.
([#3713](https://github.com/open-telemetry/opentelemetry-specification/pull/3713))

### Supplementary Guidelines

## v1.26.0 (2023-10-10)
Expand Down
2 changes: 1 addition & 1 deletion specification/common/attribute-requirement-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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.

<!-- TODO(jsuereth) - make examples not break on changes to semconv -->
arminru marked this conversation as resolved.
Show resolved Hide resolved
For example, `server.address` is `Conditionally Required` by the [Database convention](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/README.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.
For example, `server.address` is `Conditionally Required` by the [Database convention](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/README.md) when available. When `network.peer.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

Expand Down
4 changes: 2 additions & 2 deletions specification/logs/data-model-appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@ When mapping from the unified model to HEC, we apply this additional mapping:
<td>%a</td>
<td>string</td>
<td>Client address</td>
<td>Attributes["client.socket.address"]</td>
<td>Attributes["network.peer.address"]</td>
</tr>
<tr>
<td>%A</td>
<td>string</td>
<td>Server address</td>
<td>Attributes["server.socket.address"]</td>
<td>Attributes["network.local.address"]</td>
</tr>
<tr>
<td>%h</td>
Expand Down
15 changes: 7 additions & 8 deletions specification/trace/sdk_exporters/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,15 @@ always available. The following table lists the possible attributes for
|---|---|---|
|1|peer.service|[OpenTelemetry adopted attribute for remote service.](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#server-client-and-shared-network-attributes)|
|2|server.address|[OpenTelemetry adopted attribute for remote hostname, or similar.](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#server-client-and-shared-network-attributes)|
|3|server.socket.domain|[OpenTelemetry adopted attribute for remote socket hostname of the peer.](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#server-client-and-shared-network-attributes)|
|4|server.socket.address & server.socket.port|[OpenTelemetry adopted attribute for remote socket address of the peer.](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#server-client-and-shared-network-attributes)|
|5|peer.hostname|Remote hostname defined in OpenTracing specification.|
|6|peer.address|Remote address defined in OpenTracing specification.|
|7|db.name|Commonly used database name attribute for DB Spans.|
|3|network.peer.address & network.peer.port|[OpenTelemetry adopted attribute for remote socket address of the peer.](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attributes.md#server-client-and-shared-network-attributes)|
|4|peer.hostname|Remote hostname defined in OpenTracing specification.|
|5|peer.address|Remote address defined in OpenTracing specification.|
|6|db.name|Commonly used database name attribute for DB Spans.|

* Ranking should control the selection order. For example, `server.address` (Rank
2) should be selected before `peer.address` (Rank 6).
* `server.socket.domain` and `server.socket.address` can be used by themselves as `remoteEndpoint` but should be combined
with `server.socket.port` if it is also present.
2) should be selected before `peer.address` (Rank 5).
* `network.peer.address` can be used by itself as `remoteEndpoint` but should be combined
with `network.peer.port` if it is also present.

#### Zipkin -> OTLP

Expand Down
Loading