public Annotation deepCopy() { return new Annotation(this); }
public Annotation deepCopy() { return new Annotation(this); }
public Annotation deepCopy() { return new Annotation(this); }
public static Annotation create(long timestamp, String value, @Nullable Endpoint endpoint) { return new Annotation(timestamp, value, endpoint); }
public static Annotation create(long timestamp, String value, @Nullable Endpoint endpoint) { return new Annotation(timestamp, value, endpoint); }
/** * Performs a deep copy on <i>other</i>. */ public Span(Span other) { __isset_bitfield = other.__isset_bitfield; this.trace_id = other.trace_id; if (other.isSetName()) { this.name = other.name; } this.id = other.id; this.parent_id = other.parent_id; if (other.isSetAnnotations()) { List<Annotation> __this__annotations = new ArrayList<Annotation>(); for (Annotation other_element : other.annotations) { __this__annotations.add(new Annotation(other_element)); } this.annotations = __this__annotations; } if (other.isSetBinary_annotations()) { List<BinaryAnnotation> __this__binary_annotations = new ArrayList<BinaryAnnotation>(); for (BinaryAnnotation other_element : other.binary_annotations) { __this__binary_annotations.add(new BinaryAnnotation(other_element)); } this.binary_annotations = __this__binary_annotations; } this.debug = other.debug; }
/** * Performs a deep copy on <i>other</i>. */ public Span(Span other) { __isset_bitfield = other.__isset_bitfield; this.trace_id = other.trace_id; if (other.isSetName()) { this.name = other.name; } this.id = other.id; this.parent_id = other.parent_id; if (other.isSetAnnotations()) { List<Annotation> __this__annotations = new ArrayList<Annotation>(); for (Annotation other_element : other.annotations) { __this__annotations.add(new Annotation(other_element)); } this.annotations = __this__annotations; } if (other.isSetBinary_annotations()) { List<BinaryAnnotation> __this__binary_annotations = new ArrayList<BinaryAnnotation>(); for (BinaryAnnotation other_element : other.binary_annotations) { __this__binary_annotations.add(new BinaryAnnotation(other_element)); } this.binary_annotations = __this__binary_annotations; } this.debug = other.debug; }
/** * Performs a deep copy on <i>other</i>. */ public Span(Span other) { __isset_bitfield = other.__isset_bitfield; this.trace_id = other.trace_id; if (other.isSetName()) { this.name = other.name; } this.id = other.id; this.parent_id = other.parent_id; if (other.isSetAnnotations()) { List<Annotation> __this__annotations = new ArrayList<Annotation>(); for (Annotation other_element : other.annotations) { __this__annotations.add(new Annotation(other_element)); } this.annotations = __this__annotations; } if (other.isSetBinary_annotations()) { List<BinaryAnnotation> __this__binary_annotations = new ArrayList<BinaryAnnotation>(); for (BinaryAnnotation other_element : other.binary_annotations) { __this__binary_annotations.add(new BinaryAnnotation(other_element)); } this.binary_annotations = __this__binary_annotations; } this.debug = other.debug; }
/** * Create an annotation with the correct times and endpoint. * * @param value Annotation value * @param time timestamp will be extracted * @param ep the endopint this annotation will be associated with. * @param sendRequest use the first or last timestamp. */ private static Annotation createZipkinAnnotation(String value, long time, Endpoint ep, boolean sendRequest) { Annotation annotation = new Annotation(); annotation.setHost(ep); // Zipkin is in microseconds if (sendRequest) { annotation.setTimestamp(time * 1000); } else { annotation.setTimestamp(time * 1000); } annotation.setValue(value); return annotation; }
/** * Create an annotation with the correct times and endpoint. * * @param value Annotation value * @param time timestamp will be extracted * @param ep the endopint this annotation will be associated with. * @param sendRequest use the first or last timestamp. */ private static Annotation createZipkinAnnotation(String value, long time, Endpoint ep, boolean sendRequest) { Annotation annotation = new Annotation(); annotation.setHost(ep); // Zipkin is in microseconds if (sendRequest) { annotation.setTimestamp(time * 1000); } else { annotation.setTimestamp(time * 1000); } annotation.setValue(value); return annotation; }
/** * Create an annotation with the correct times and endpoint. * * @param value Annotation value * @param time timestamp will be extracted * @param ep the endopint this annotation will be associated with. * @param sendRequest use the first or last timestamp. */ private static Annotation createZipkinAnnotation(String value, long time, Endpoint ep, boolean sendRequest) { Annotation annotation = new Annotation(); annotation.setHost(ep); // Zipkin is in microseconds if (sendRequest) { annotation.setTimestamp(time * 1000); } else { annotation.setTimestamp(time * 1000); } annotation.setDuration(1); annotation.setValue(value); return annotation; }
_elem2 = new Annotation(); _elem2.read(iprot); struct.annotations.add(_elem2);
_elem12 = new Annotation(); _elem12.read(iprot); struct.annotations.add(_elem12);
_elem12 = new Annotation(); _elem12.read(iprot); struct.annotations.add(_elem12);
_elem12 = new Annotation(); _elem12.read(iprot); struct.annotations.add(_elem12);
/** * {@inheritDoc} */ @Override public void submitAnnotation(final String annotationName) { final Span span = getSpan(); if (span != null) { final Annotation annotation = new Annotation(); annotation.setTimestamp(currentTimeMicroseconds()); annotation.setHost(getEndPoint()); annotation.setValue(annotationName); addAnnotation(span, annotation); } }
/** * {@inheritDoc} */ @Override public void submitAnnotation(final String annotationName, final long startTime, final long endTime) { final Span span = getSpan(); if (span != null) { final Annotation annotation = new Annotation(); final int duration = (int)(endTime - startTime); annotation.setTimestamp(startTime * 1000); annotation.setHost(getEndPoint()); annotation.setDuration(duration * 1000); // Duration is currently not supported in the ZipkinUI, so also add it as part of the annotation name. annotation.setValue(annotationName + "=" + duration + "ms"); addAnnotation(span, annotation); } }
_elem2 = new Annotation(); _elem2.read(iprot); struct.annotations.add(_elem2);
_elem2 = new Annotation(); _elem2.read(iprot); struct.annotations.add(_elem2);