/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder addTimeEvent( int index, com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.add(index, builderForValue.build()); onChanged(); } else { timeEventBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Text annotation with a set of attributes. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2;</code> */ public com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.Builder getAnnotationBuilder() { return getAnnotationFieldBuilder().getBuilder(); } /**
TimeEvent annotationTimeEvent1 = TimeEvent.newBuilder() .setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription( .setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp1.getSeconds()) .setNanos(eventTimestamp1.getNanos()) .build()) .build(); TimeEvent annotationTimeEvent2 = TimeEvent.newBuilder() .setAnnotation( TimeEvent.Annotation.newBuilder() .setDescription( .setAttributes(Span.Attributes.newBuilder().build()) .build()) .setTime( com.google.protobuf.Timestamp.newBuilder() .setSeconds(eventTimestamp3.getSeconds()) .setNanos(eventTimestamp3.getNanos()) .build()) .build();
for (Annotation annotation : zipkinSpan.annotations()) { events.addTimeEvent(TimeEvent.newBuilder() .setTime(createTimestamp(annotation.timestamp())) .setAnnotation(TimeEvent.Annotation.newBuilder() .setDescription(toTruncatableString(annotation.value()))) );
/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder addTimeEvent( int index, com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.add(index, builderForValue.build()); onChanged(); } else { timeEventBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder setTimeEvent( int index, com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.set(index, builderForValue.build()); onChanged(); } else { timeEventBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder addTimeEvent( com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.add(builderForValue.build()); onChanged(); } else { timeEventBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Text annotation with a set of attributes. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2;</code> */ public com.google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.Builder getAnnotationBuilder() { return getAnnotationFieldBuilder().getBuilder(); } /**
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(); }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
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(); }
@java.lang.Override public com.google.devtools.cloudtrace.v2.Span.TimeEvent build() { com.google.devtools.cloudtrace.v2.Span.TimeEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
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(); }
/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder addTimeEvent( com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.add(builderForValue.build()); onChanged(); } else { timeEventBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * A collection of `TimeEvent`s. * </pre> * * <code>repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1;</code> */ public Builder setTimeEvent( int index, com.google.devtools.cloudtrace.v2.Span.TimeEvent.Builder builderForValue) { if (timeEventBuilder_ == null) { ensureTimeEventIsMutable(); timeEvent_.set(index, builderForValue.build()); onChanged(); } else { timeEventBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
@java.lang.Override public com.google.devtools.cloudtrace.v2.Span.TimeEvent build() { com.google.devtools.cloudtrace.v2.Span.TimeEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**