Skip to content
Merged
Changes from 1 commit
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
20 changes: 18 additions & 2 deletions specification/trace/sdk_exporters/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ OpenTelemetry fields:
Zipkin fields:

- Local_endpoint
- Remote_endpoint
- debug
- Shared

Expand Down Expand Up @@ -79,6 +78,23 @@ Zipkin.
| `SpanKind.PRODUCER`|`SpanKind.PRODUCER` ||
|`SpanKind.INTERNAL`|`null` |must be omitted (set to `null`)|

### Remote endpoint

If Zipkin `SpanKind` resolves to either `SpanKind.CLIENT` or `SpanKind.PRODUCER` then the service SHOULD specify remote endpoint otherwise Zipkin won't treat the Span as a dependency. `peer.service` is the preferred attribute but is not always available. The following table lists the possible attributes for `remoteEndpoint` by preferred ranking:

|Rank|Attribute Name|Reason|
|---|---|---|
|1|peer.service|[OpenTelemetry adopted attribute for remote service.](../semantic_conventions/span-general.md#general-remote-service-attributes)|
|2|net.peer.name|[OpenTelemetry adopted attribute for remote hostname, or similar.](../semantic_conventions/span-general.md#general-network-connection-attributes)|
|3|net.peer.ip & net.peer.port|[OpenTelemetry adopted attribute for remote address of the peer.](../semantic_conventions/span-general.md#general-network-connection-attributes)|
|4|peer.hostname|Remote hostname defined in OpenTracing specification.|
|5|peer.address|Remote address defined in OpenTracing specification.|
|6|http.host|Commonly used HTTP host header attribute for Http Spans.|
|7|db.name|Commonly used database name attribute for DB Spans.|

* Ranking should control the selection order. For example, `net.peer.name` (Rank 2) should be selected before `http.host` (Rank 6).
* `net.peer.ip` can be used by itself as `remoteEndpoint` but should be combined with `net.peer.port` if it is also present.

### Attribute

OpenTelemetry Span and Resource `Attribute`(s) MUST be reported as `tags` to
Expand Down Expand Up @@ -144,4 +160,4 @@ Frameworks made before then use a more complex v1 [Thrift](https://github.com/op

Consider using [V1SpanConverter.java](https://github.com/openzipkin/zipkin/blob/master/zipkin/src/main/java/zipkin2/v1/V1SpanConverter.java) as a reference implementation for converting v1 model to OpenTelemetry.

The span timestamp and duration were late additions to the V1 format. As in the code link above, it is possible to heuristically derive them from annotations.
The span timestamp and duration were late additions to the V1 format. As in the code link above, it is possible to heuristically derive them from annotations.