本文整理了Java中zipkin2.Annotation.value()
方法的一些代码示例,展示了Annotation.value()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Annotation.value()
方法的具体详情如下:
包路径:zipkin2.Annotation
类名称:Annotation
方法名:value
[英]Usually a short tag indicating an event, like cache.miss or error
[中]通常是指示事件的短标记,如缓存。失误
代码示例来源:origin: line/armeria
.filter(a -> a.value().equals("ws"))
.findFirst().get().timestamp();
final long clientWireReceiveTime = clientFooSpan.annotations().stream()
.filter(a -> a.value().equals("wr"))
.findFirst().get().timestamp();
final long clientEndTime = clientStartTime + clientFooSpan.durationAsLong();
.filter(a -> a.value().equals("ws"))
.findFirst().get().timestamp();
final long serverWireReceiveTime = serviceFooSpan.annotations().stream()
.filter(a -> a.value().equals("wr"))
.findFirst().get().timestamp();
final long serverEndTime = serverStartTime + serviceFooSpan.durationAsLong();
代码示例来源:origin: io.zipkin.zipkin2/zipkin
@Override public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof Annotation)) return false;
Annotation that = (Annotation) o;
return timestamp == that.timestamp() && value.equals(that.value());
}
代码示例来源:origin: io.zipkin.zipkin2/zipkin-storage-cassandra
AnnotationUDT(Annotation annotation) {
this.ts = annotation.timestamp();
this.v = annotation.value();
}
代码示例来源:origin: apache/cxf
@Override
protected boolean matchesSafely(Annotation item) {
return value.equals(item.value());
}
});
代码示例来源:origin: io.zipkin.zipkin2/zipkin
/** Compares by {@link #timestamp}, then {@link #value}. */
@Override public int compareTo(Annotation that) {
if (this == that) return 0;
int byTimestamp = timestamp() < that.timestamp() ? -1 : timestamp() == that.timestamp() ? 0 : 1;
if (byTimestamp != 0) return byTimestamp;
return value().compareTo(that.value());
}
代码示例来源:origin: io.zipkin.zipkin2/zipkin-storage-cassandra
/**
* Returns a set of annotation getValues and tags joined on equals, delimited by ░
*
* @see QueryRequest#annotationQuery()
*/
static @Nullable String annotationQuery(Span span) {
if (span.annotations().isEmpty() && span.tags().isEmpty()) return null;
char delimiter = '░'; // as very unlikely to be in the query
StringBuilder result = new StringBuilder().append(delimiter);
for (Annotation a : span.annotations()) {
if (a.value().length() > LONGEST_VALUE_TO_INDEX) continue;
result.append(a.value()).append(delimiter);
}
for (Map.Entry<String, String> tag : span.tags().entrySet()) {
if (tag.getValue().length() > LONGEST_VALUE_TO_INDEX) continue;
result.append(tag.getKey()).append(delimiter); // search is possible by key alone
result.append(tag.getKey() + "=" + tag.getValue()).append(delimiter);
}
return result.length() == 1 ? null : result.toString();
}
代码示例来源:origin: io.zipkin.zipkin2/zipkin
@Override void writeValue(Buffer b, Annotation value) {
TIMESTAMP.write(b, value.timestamp());
VALUE.write(b, value.value());
}
代码示例来源:origin: io.zipkin.zipkin2/zipkin
@Override int sizeOfValue(Annotation value) {
return TIMESTAMP.sizeInBytes(value.timestamp()) + VALUE.sizeInBytes(value.value());
}
代码示例来源:origin: Nike-Inc/wingtips
private List<TimestampedAnnotation> toWingtipsAnnotations(List<Annotation> zipkinAnnotations) {
return zipkinAnnotations
.stream()
.map(za -> TimestampedAnnotation.forEpochMicros(za.timestamp(), za.value()))
.collect(Collectors.toList());
}
代码示例来源:origin: io.netifi.proteus/tracing-openzipkin
private zipkin2.proto3.Annotation.Builder mapAnnotation(Annotation annotation) {
return zipkin2.proto3.Annotation.newBuilder()
.setTimestamp(annotation.timestamp())
.setValue(annotation.value());
}
代码示例来源:origin: netifi-proteus/proteus-java
private zipkin2.proto3.Annotation.Builder mapAnnotation(Annotation annotation) {
return zipkin2.proto3.Annotation.newBuilder()
.setTimestamp(annotation.timestamp())
.setValue(annotation.value());
}
代码示例来源:origin: io.netifi.proteus/proteus-tracing-openzipkin
private zipkin2.proto3.Annotation.Builder mapAnnotation(Annotation annotation) {
return zipkin2.proto3.Annotation.newBuilder()
.setTimestamp(annotation.timestamp())
.setValue(annotation.value());
}
代码示例来源:origin: com.google.cloud.trace.adapters.zipkin/translation
result.put(getLabelName(annotation.value()), formatTimestamp(annotation.timestamp()));
代码示例来源:origin: io.zipkin.zipkin2/zipkin
if ("".equals(annotationQueryRemaining.get(a.value()))) {
annotationQueryRemaining.remove(a.value());
代码示例来源:origin: io.zipkin.zipkin2/zipkin
if (beginAnnotation && a.value().equals(md.begin)) continue;
if (endAnnotation && a.value().equals(md.end)) continue;
result.addAnnotation(a.timestamp(), a.value(), ep);
代码示例来源:origin: io.zipkin.zipkin2/zipkin
for (int i = 0; i < length; i++) {
Annotation a = value.annotations().get(i);
sizeInBytes += annotationSizeInBytes(a.timestamp(), a.value(), 0);
代码示例来源:origin: io.zipkin.zipkin2/zipkin
for (int i = 0, length = value.annotations().size(); i < length; ) {
Annotation a = value.annotations().get(i++);
writeAnnotation(a.timestamp(), a.value(), null, b);
if (i < length) b.writeByte(',');
代码示例来源:origin: openzipkin/zipkin-gcp
.setTime(createTimestamp(annotation.timestamp()))
.setAnnotation(TimeEvent.Annotation.newBuilder()
.setDescription(toTruncatableString(annotation.value())))
);
代码示例来源:origin: io.zipkin.zipkin2/zipkin-storage-cassandra
builder.addAnnotation(udt.toAnnotation().timestamp(), udt.toAnnotation().value());
代码示例来源:origin: io.github.scouter-project/zipkin-storage-scouter-udp
for (Annotation annotation : span.annotations()) {
pack.annotationTimestamps.add(annotation.timestamp() / 1000);
pack.annotationValues.add(annotation.value());
内容来源于网络,如有侵权,请联系作者删除!