Skip to content

Commit

Permalink
zipkin: Handle older semconv (#3794)
Browse files Browse the repository at this point in the history
Fixes
#3793

## Changes

Update OpenTelemetry to Zipkin Transformation to handle attributes from
older semantic conventions in a backwards compatible way so that
following attributes are (again) handled:
- `net.peer.name`
- `net.host.name`
- `net.sock.peer.addr` & `net.sock.peer.port`
- `server.socket.domain`
- `server.socket.address` & `server.socket.port`

The backwards compatibility of a stable OpenTelemetry to Zipkin
Transformation was broken by:
-
#3402
-
#3713
  • Loading branch information
pellared authored Jan 9, 2024
1 parent 5faaf6b commit 6d1c567
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .markdown_link_check_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"replacement": "{{BASEURL}}/"
},
{
"pattern": "^https://github.com/open-telemetry/opentelemetry-specification/(blob|tree)/[^/]+/(specification|supplementary-guidelines)/",
"pattern": "^https://github.com/open-telemetry/opentelemetry-specification/(blob|tree)/main/(specification|supplementary-guidelines)/",
"replacement": "LINK-CHECK-ERROR-USE-LOCAL-PATH-TO-DOC-PAGE-NOT-EXTERNAL-URL/"
}
],
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ release.

### Traces

- Update OpenTelemetry to Zipkin Transformation to handle attributes from older semantic conventions in a backwards compatible way.
([#3794](https://github.com/open-telemetry/opentelemetry-specification/pull/3794))

### Metrics

- Add optional configuration for Prometheus exporters to optionally drop `otel_scope_info` metric.
Expand Down
15 changes: 10 additions & 5 deletions specification/trace/sdk_exporters/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,18 @@ 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|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.|
|3|net.peer.name|[Legacy OpenTelemetry adopted attribute for remote hostname, or similar.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes)|
|4|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)|
|5|server.socket.domain|[Legacy OpenTelemetry adopted attribute for remote socket hostname of the peer.](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/general/general-attributes.md#server-and-client-attributes)|
|6|server.socket.address & server.socket.port|[Legacy OpenTelemetry adopted attribute for remote socket address of the peer.](https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/general/general-attributes.md#server-and-client-attributes)|
|7|net.sock.peer.name|[Legacy OpenTelemetry adopted attribute for remote socket hostname of the peer.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes)|
|8|net.sock.peer.addr & net.sock.peer.port|[Legacy OpenTelemetry adopted attribute for remote socket address of the peer.](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes)|
|9|peer.hostname|Remote hostname defined in OpenTracing specification.|
|10|peer.address|Remote address defined in OpenTracing specification.|
|11|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 5).
2) should be selected before `peer.address` (Rank 11).
* `network.peer.address` can be used by itself as `remoteEndpoint` but should be combined
with `network.peer.port` if it is also present.

Expand Down

0 comments on commit 6d1c567

Please sign in to comment.