@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
result = result && getName().equals(other.getName()); result = result && getSpanId().equals(other.getSpanId()); result = result && getParentSpanId().equals(other.getParentSpanId()); result = result && (hasDisplayName() == other.hasDisplayName()); if (hasDisplayName()) { result = result && getDisplayName().equals(other.getDisplayName()); result = result && (hasStartTime() == other.hasStartTime()); if (hasStartTime()) { result = result && getStartTime().equals(other.getStartTime()); result = result && (hasEndTime() == other.hasEndTime()); if (hasEndTime()) { result = result && getEndTime().equals(other.getEndTime()); result = result && (hasAttributes() == other.hasAttributes()); if (hasAttributes()) { result = result && getAttributes().equals(other.getAttributes()); result = result && (hasStackTrace() == other.hasStackTrace()); if (hasStackTrace()) { result = result && getStackTrace().equals(other.getStackTrace()); result = result && (hasTimeEvents() == other.hasTimeEvents()); if (hasTimeEvents()) { result = result && getTimeEvents().equals(other.getTimeEvents()); result = result && (hasLinks() == other.hasLinks()); if (hasLinks()) {
@java.lang.Override public com.google.devtools.cloudtrace.v2.Span getDefaultInstanceForType() { return com.google.devtools.cloudtrace.v2.Span.getDefaultInstance(); }
/** * * * <pre> * The [SPAN_ID] portion of the span's resource name. * </pre> * * <code>string span_id = 2;</code> */ public Builder clearSpanId() { spanId_ = getDefaultInstance().getSpanId(); onChanged(); return this; } /**
/** * * * <pre> * The [SPAN_ID] of this span's parent span. If this is a root span, * then this field must be empty. * </pre> * * <code>string parent_span_id = 3;</code> */ public Builder clearParentSpanId() { parentSpanId_ = getDefaultInstance().getParentSpanId(); onChanged(); return this; } /**
/** * * * <pre> * The resource name of the span in the following format: * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] * [TRACE_ID] is a unique identifier for a trace within a project; * it is a 32-character hexadecimal encoding of a 16-byte array. * [SPAN_ID] is a unique identifier for a span within a trace; it * is a 16-character hexadecimal encoding of an 8-byte array. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); if (!getSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, spanId_); if (!getParentSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parentSpanId_); output.writeMessage(4, getDisplayName()); output.writeMessage(5, getStartTime()); output.writeMessage(6, getEndTime()); output.writeMessage(7, getAttributes()); output.writeMessage(8, getStackTrace()); output.writeMessage(9, getTimeEvents()); output.writeMessage(10, getLinks()); output.writeMessage(11, getStatus()); output.writeMessage(12, getSameProcessAsParentSpan()); output.writeMessage(13, getChildSpanCount());
handler.generateSpan( spanData, EMPTY_RESOURCE_LABELS, Collections.<String, AttributeValue>emptyMap()); assertThat(span.getName()).isEqualTo(SD_SPAN_NAME); assertThat(span.getSpanId()).isEqualTo(SPAN_ID); assertThat(span.getParentSpanId()).isEqualTo(PARENT_SPAN_ID); assertThat(span.getDisplayName()) .isEqualTo(TruncatableString.newBuilder().setValue(SPAN_NAME).build()); assertThat(span.getStartTime()).isEqualTo(startTime); assertThat(span.getEndTime()).isEqualTo(endTime); assertThat(span.getAttributes().getDroppedAttributesCount()) .isEqualTo(DROPPED_ATTRIBUTES_COUNT); assertThat(span.getAttributes().getAttributeMapMap()) .containsEntry(ATTRIBUTE_KEY_1, AttributeValue.newBuilder().setIntValue(10L).build()); assertThat(span.getAttributes().getAttributeMapMap()) .containsEntry(ATTRIBUTE_KEY_2, AttributeValue.newBuilder().setBoolValue(true).build()); assertThat(span.getStackTrace()).isEqualTo(StackTrace.newBuilder().build()); assertThat(span.getTimeEvents().getDroppedMessageEventsCount()) .isEqualTo(DROPPED_NETWORKEVENTS_COUNT); assertThat(span.getTimeEvents().getDroppedAnnotationsCount()) .isEqualTo(DROPPED_ANNOTATIONS_COUNT); assertThat(span.getTimeEvents().getTimeEventList()) .containsAllOf(annotationTimeEvent1, annotationTimeEvent2, sentTimeEvent, recvTimeEvent); assertThat(span.getLinks()).isEqualTo(spanLinks); assertThat(span.getStatus()).isEqualTo(spanStatus); assertThat(span.getSameProcessAsParentSpan()) .isEqualTo(com.google.protobuf.BoolValue.of(false)); assertThat(span.getChildSpanCount())
/** * * * <pre> * A description of the span's operation (up to 128 bytes). * Stackdriver Trace displays the description in the * {% dynamic print site_values.console_name %}. * For example, the display name can be a qualified method name or a file name * and a line number where the operation is called. A best practice is to use * the same display name within an application and at the same call point. * This makes it easier to correlate spans in different traces. * </pre> * * <code>.google.devtools.cloudtrace.v2.TruncatableString display_name = 4;</code> */ public com.google.devtools.cloudtrace.v2.TruncatableStringOrBuilder getDisplayNameOrBuilder() { return getDisplayName(); }
/** * * * <pre> * A set of attributes on the span. You can have up to 32 attributes per * span. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.Attributes attributes = 7;</code> */ public com.google.devtools.cloudtrace.v2.Span.AttributesOrBuilder getAttributesOrBuilder() { return getAttributes(); }
/** * * * <pre> * An optional number of child spans that were generated while this span * was active. If set, allows implementation to detect missing child spans. * </pre> * * <code>.google.protobuf.Int32Value child_span_count = 13;</code> */ public com.google.protobuf.Int32ValueOrBuilder getChildSpanCountOrBuilder() { return getChildSpanCount(); }
/** * * * <pre> * Links associated with the span. You can have up to 128 links per Span. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.Links links = 10;</code> */ public com.google.devtools.cloudtrace.v2.Span.LinksOrBuilder getLinksOrBuilder() { return getLinks(); }
/** * * * <pre> * The end time of the span. On the client side, this is the time kept by * the local machine where the span execution ends. On the server side, this * is the time when the server application handler stops running. * </pre> * * <code>.google.protobuf.Timestamp end_time = 6;</code> */ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); }
/** * * * <pre> * (Optional) Set this parameter to indicate whether this span is in * the same process as its parent. If you do not set this parameter, * Stackdriver Trace is unable to take advantage of this helpful * information. * </pre> * * <code>.google.protobuf.BoolValue same_process_as_parent_span = 12;</code> */ public com.google.protobuf.BoolValueOrBuilder getSameProcessAsParentSpanOrBuilder() { return getSameProcessAsParentSpan(); }
if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); if (!getSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, spanId_); if (!getParentSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parentSpanId_); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDisplayName()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartTime()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAttributes()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStackTrace()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTimeEvents()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLinks()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getStatus()); 12, getSameProcessAsParentSpan()); size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getChildSpanCount());
/** * * * <pre> * The [SPAN_ID] portion of the span's resource name. * </pre> * * <code>string span_id = 2;</code> */ public Builder clearSpanId() { spanId_ = getDefaultInstance().getSpanId(); onChanged(); return this; } /**
/** * * * <pre> * The [SPAN_ID] of this span's parent span. If this is a root span, * then this field must be empty. * </pre> * * <code>string parent_span_id = 3;</code> */ public Builder clearParentSpanId() { parentSpanId_ = getDefaultInstance().getParentSpanId(); onChanged(); return this; } /**
/** * * * <pre> * The resource name of the span in the following format: * projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID] * [TRACE_ID] is a unique identifier for a trace within a project; * it is a 32-character hexadecimal encoding of a 16-byte array. * [SPAN_ID] is a unique identifier for a span within a trace; it * is a 16-character hexadecimal encoding of an 8-byte array. * </pre> * * <code>string name = 1;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
/** * * * <pre> * A description of the span's operation (up to 128 bytes). * Stackdriver Trace displays the description in the * {% dynamic print site_values.console_name %}. * For example, the display name can be a qualified method name or a file name * and a line number where the operation is called. A best practice is to use * the same display name within an application and at the same call point. * This makes it easier to correlate spans in different traces. * </pre> * * <code>.google.devtools.cloudtrace.v2.TruncatableString display_name = 4;</code> */ public com.google.devtools.cloudtrace.v2.TruncatableStringOrBuilder getDisplayNameOrBuilder() { return getDisplayName(); }
/** * * * <pre> * A set of attributes on the span. You can have up to 32 attributes per * span. * </pre> * * <code>.google.devtools.cloudtrace.v2.Span.Attributes attributes = 7;</code> */ public com.google.devtools.cloudtrace.v2.Span.AttributesOrBuilder getAttributesOrBuilder() { return getAttributes(); }