Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
Exporter/Zipkin: Update names of status tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
songy23 committed Jun 11, 2019
1 parent ffd8c07 commit b0a785d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;

import com.google.common.annotations.VisibleForTesting;
import io.opencensus.common.Duration;
import io.opencensus.common.Function;
import io.opencensus.common.Functions;
Expand Down Expand Up @@ -53,8 +54,8 @@
final class ZipkinExporterHandler extends TimeLimitedHandler {
private static final Logger logger = Logger.getLogger(ZipkinExporterHandler.class.getName());
private static final String EXPORT_SPAN_NAME = "SendZipkinSpans";
private static final String STATUS_CODE = "census.status_code";
private static final String STATUS_DESCRIPTION = "census.status_description";
@VisibleForTesting static final String STATUS_CODE = "status.code";
@VisibleForTesting static final String STATUS_DESCRIPTION = "status.message";
private final SpanBytesEncoder encoder;
private final Sender sender;
private final Endpoint localEndpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void generateSpan_NoKindAndRemoteParent() {
.localEndpoint(localEndpoint)
.addAnnotation(1505855799000000L + 433901068L / 1000, "RECEIVED")
.addAnnotation(1505855799000000L + 459486280L / 1000, "SENT")
.putTag("census.status_code", "OK")
.putTag(ZipkinExporterHandler.STATUS_CODE, "OK")
.build());
}

Expand Down Expand Up @@ -143,7 +143,7 @@ public void generateSpan_ServerKind() {
.localEndpoint(localEndpoint)
.addAnnotation(1505855799000000L + 433901068L / 1000, "RECEIVED")
.addAnnotation(1505855799000000L + 459486280L / 1000, "SENT")
.putTag("census.status_code", "OK")
.putTag(ZipkinExporterHandler.STATUS_CODE, "OK")
.build());
}

Expand Down Expand Up @@ -184,7 +184,7 @@ public void generateSpan_ClientKind() {
.localEndpoint(localEndpoint)
.addAnnotation(1505855799000000L + 433901068L / 1000, "RECEIVED")
.addAnnotation(1505855799000000L + 459486280L / 1000, "SENT")
.putTag("census.status_code", "OK")
.putTag(ZipkinExporterHandler.STATUS_CODE, "OK")
.build());
}

Expand Down Expand Up @@ -229,7 +229,7 @@ public void generateSpan_WithAttributes() {
.localEndpoint(localEndpoint)
.addAnnotation(1505855799000000L + 433901068L / 1000, "RECEIVED")
.addAnnotation(1505855799000000L + 459486280L / 1000, "SENT")
.putTag("census.status_code", "OK")
.putTag(ZipkinExporterHandler.STATUS_CODE, "OK")
.putTag("string", "string value")
.putTag("boolean", "false")
.putTag("long", "9999")
Expand Down

0 comments on commit b0a785d

Please sign in to comment.