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

Zipkin Exporter: Set the ServiceName from the resource attributes #472

Merged
Merged
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
25 changes: 23 additions & 2 deletions specification/trace/sdk_exporters/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ OpenTelemetry fields:

Zipkin fields:

- Service name
- Local_endpoint
- Remote_endpoint
- debug
Expand All @@ -51,6 +50,22 @@ Zipkin fields:
This section discusses the details of the transformations between OpenTelemetry
and Zipkin.

### Service name

Zipkin service name MUST be set to the value of the
[resource attribute](../../resource/semantic_conventions/README.md):
`service.name`. In Zipkin it is important that the service name is consistent
for all spans in a local root. Otherwise service graph and aggregations would
not work properly. OpenTelemetry doesn't provide this consistency guarantee.
Exporter may chose to override the value for service name based on a local root
span to improve Zipkin user experience.

*Note*, the attribute `service.namespace` must not be used for the Zipkin
service name and should be sent as a Zipkin tag.

*Note*, exporter to Zipkin MUST allow to configure the default "fall back" name
to use as a Zipkin service name.

### SpanKind

The following table lists all the `SpanKind` mappings between OpenTelemetry and
Expand All @@ -66,7 +81,13 @@ Zipkin.

### Attribute

OpenTelemetry Span `Attribute`(s) MUST be reported as `tags` to Zipkin.
OpenTelemetry Span and Resource `Attribute`(s) MUST be reported as `tags` to
Zipkin.

Some attributes defined in [semantic
convention](../semantic_conventions/README.md)
document maps to the strongly-typed fields of Zipkin spans.

Primitive types MUST be converted to string using en-US culture settings.
Boolean values must use lower case strings `"true"` and `"false"`, except an
attribute named `error`. In case if value of the attribute is `false`, Zipkin
Expand Down