for (Annotation annotation : zipkinSpan.annotations()) { events.addTimeEvent(TimeEvent.newBuilder() .setTime(createTimestamp(annotation.timestamp())) .setAnnotation(TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableString(annotation.value())))
.setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp1.getSeconds()) .setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp3.getSeconds()) .setType(MessageEvent.Type.SENT) .setId(sentMessageEvent.getMessageId())) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp2.getSeconds()) .setType(MessageEvent.Type.RECEIVED) .setId(recvMessageEvent.getMessageId())) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp1.getSeconds())
private static TimeEvent toTimeMessageEventProto( TimedEvent<io.opencensus.trace.MessageEvent> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); io.opencensus.trace.MessageEvent messageEvent = timedEvent.getEvent(); timeEventBuilder.setMessageEvent( TimeEvent.MessageEvent.newBuilder() .setId(messageEvent.getMessageId()) .setCompressedSizeBytes(messageEvent.getCompressedMessageSize()) .setUncompressedSizeBytes(messageEvent.getUncompressedMessageSize()) .setType(toMessageEventTypeProto(messageEvent)) .build()); return timeEventBuilder.build(); }
private static TimeEvent toTimeMessageEventProto( TimedEvent<io.opencensus.trace.MessageEvent> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); io.opencensus.trace.MessageEvent messageEvent = timedEvent.getEvent(); timeEventBuilder.setMessageEvent( TimeEvent.MessageEvent.newBuilder() .setId(messageEvent.getMessageId()) .setCompressedSizeBytes(messageEvent.getCompressedMessageSize()) .setUncompressedSizeBytes(messageEvent.getUncompressedMessageSize()) .setType(toMessageEventTypeProto(messageEvent)) .build()); return timeEventBuilder.build(); }
private static TimeEvent toTimeAnnotationProto(TimedEvent<Annotation> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); Annotation annotation = timedEvent.getEvent(); timeEventBuilder.setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableStringProto(annotation.getDescription())) .setAttributes(toAttributesBuilderProto(annotation.getAttributes(), 0)) .build()); return timeEventBuilder.build(); }
private static TimeEvent toTimeAnnotationProto(TimedEvent<Annotation> timedEvent) { TimeEvent.Builder timeEventBuilder = TimeEvent.newBuilder().setTime(toTimestampProto(timedEvent.getTimestamp())); Annotation annotation = timedEvent.getEvent(); timeEventBuilder.setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableStringProto(annotation.getDescription())) .setAttributes(toAttributesBuilderProto(annotation.getAttributes(), 0)) .build()); return timeEventBuilder.build(); }