synchronized MutableSpan addBinaryAnnotation(String key, byte[] value, BinaryAnnotation.Type type) { binaryAnnotations.add(BinaryAnnotation.create(key, value, type, endpoint)); return this; }
protected void addAllTagsToBuilderAsBinaryAnnotations( zipkin.Span.Builder builder, Map<String,String> tagsToAdd, Endpoint zipkinEndpoint ) { for (Map.Entry<String, String> tagEntry : tagsToAdd.entrySet()) { BinaryAnnotation tagAnnotation = BinaryAnnotation.create( tagEntry.getKey(), tagEntry.getValue(), zipkinEndpoint ); builder.addBinaryAnnotation(tagAnnotation); } }
protected void addAllTagsToBuilderAsBinaryAnnotations( zipkin.Span.Builder builder, Map<String,String> tagsToAdd, Endpoint zipkinEndpoint ) { for (Map.Entry<String, String> tagEntry : tagsToAdd.entrySet()) { BinaryAnnotation tagAnnotation = BinaryAnnotation.create( tagEntry.getKey(), tagEntry.getValue(), zipkinEndpoint ); builder.addBinaryAnnotation(tagAnnotation); } }
endpoint)); } else { span.addBinaryAnnotation(BinaryAnnotation.create( a.getValue(ZIPKIN_ANNOTATIONS.A_KEY), a.getValue(ZIPKIN_ANNOTATIONS.A_VALUE),
endpoint)); } else { span.addBinaryAnnotation(BinaryAnnotation.create( a.getValue(ZIPKIN_ANNOTATIONS.A_KEY), a.getValue(ZIPKIN_ANNOTATIONS.A_VALUE),
endpoint)); } else { span.addBinaryAnnotation(BinaryAnnotation.create( a.getValue(ZIPKIN_ANNOTATIONS.A_KEY), a.getValue(ZIPKIN_ANNOTATIONS.A_VALUE),
protected zipkin.Span.Builder createNewZipkinSpanBuilderWithSpanPurposeAnnotations( Span wingtipsSpan, long startEpochMicros, long durationMicros, Endpoint zipkinEndpoint, String localComponentNamespace ) { zipkin.Span.Builder zsb = zipkin.Span.builder(); switch(wingtipsSpan.getSpanPurpose()) { case SERVER: zsb.addAnnotation(Annotation.create(startEpochMicros, Constants.SERVER_RECV, zipkinEndpoint)) .addAnnotation(Annotation.create(startEpochMicros + durationMicros, Constants.SERVER_SEND, zipkinEndpoint)); break; case CLIENT: zsb.addAnnotation(Annotation.create(startEpochMicros, Constants.CLIENT_SEND, zipkinEndpoint)) .addAnnotation(Annotation.create(startEpochMicros + durationMicros, Constants.CLIENT_RECV, zipkinEndpoint)); break; case LOCAL_ONLY: case UNKNOWN: // intentional fall-through: local and unknown span purpose are treated the same way zsb.addBinaryAnnotation(BinaryAnnotation.create(Constants.LOCAL_COMPONENT, localComponentNamespace, zipkinEndpoint)); break; default: logger.warn("Unhandled SpanPurpose type: " + wingtipsSpan.getSpanPurpose().name()); } return zsb; }
protected zipkin.Span.Builder createNewZipkinSpanBuilderWithSpanPurposeAnnotations( Span wingtipsSpan, long startEpochMicros, long durationMicros, Endpoint zipkinEndpoint, String localComponentNamespace ) { zipkin.Span.Builder zsb = zipkin.Span.builder(); switch(wingtipsSpan.getSpanPurpose()) { case SERVER: zsb.addAnnotation(Annotation.create(startEpochMicros, Constants.SERVER_RECV, zipkinEndpoint)) .addAnnotation(Annotation.create(startEpochMicros + durationMicros, Constants.SERVER_SEND, zipkinEndpoint)); break; case CLIENT: zsb.addAnnotation(Annotation.create(startEpochMicros, Constants.CLIENT_SEND, zipkinEndpoint)) .addAnnotation(Annotation.create(startEpochMicros + durationMicros, Constants.CLIENT_RECV, zipkinEndpoint)); break; case LOCAL_ONLY: case UNKNOWN: // intentional fall-through: local and unknown span purpose are treated the same way zsb.addBinaryAnnotation(BinaryAnnotation.create(Constants.LOCAL_COMPONENT, localComponentNamespace, zipkinEndpoint)); break; default: logger.warn("Unhandled SpanPurpose type: " + wingtipsSpan.getSpanPurpose().name()); } return zsb; }
endpoint)); } else { span.addBinaryAnnotation(BinaryAnnotation.create( a.getValue(ZIPKIN_ANNOTATIONS.A_KEY), a.getValue(ZIPKIN_ANNOTATIONS.A_VALUE),
BinaryAnnotation.create(Constants.LOCAL_COMPONENT, localComponentNamespace, zipkinEndpoint) );