Class SegmentObject.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
org.apache.skywalking.apm.network.language.agent.v3.SegmentObject.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,SegmentObjectOrBuilder
- Enclosing class:
- SegmentObject
public static final class SegmentObject.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
implements SegmentObjectOrBuilder
The segment is a collection of spans. It includes all collected spans in a simple one request context, such as a HTTP request process. We recommend the agent/SDK report all tracked data of one request once for all. Typically, such as in Java, one segment represent all tracked operations(spans) of one request context in the same thread. At the same time, in some language there is not a clear `thread` concept like golang. Then, it could represent all tracked operations of one request context cross threads/goroutines.Protobuf type
skywalking.v3.SegmentObject-
Method Summary
Modifier and TypeMethodDescriptionaddAllSpans(Iterable<? extends SpanObject> values) Span collections included in this segment.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addSpans(int index, SpanObject value) Span collections included in this segment.addSpans(int index, SpanObject.Builder builderForValue) Span collections included in this segment.addSpans(SpanObject value) Span collections included in this segment.addSpans(SpanObject.Builder builderForValue) Span collections included in this segment.Span collections included in this segment.addSpansBuilder(int index) Span collections included in this segment.build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Whether the segment includes all tracked spans.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) **Service**.**Service Instance**.Span collections included in this segment.A string id represents the whole trace.A unique id represents this segment.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanWhether the segment includes all tracked spans.**Service**.com.google.protobuf.ByteString**Service**.**Service Instance**.com.google.protobuf.ByteString**Service Instance**.getSpans(int index) Span collections included in this segment.getSpansBuilder(int index) Span collections included in this segment.Span collections included in this segment.intSpan collections included in this segment.Span collections included in this segment.getSpansOrBuilder(int index) Span collections included in this segment.List<? extends SpanObjectOrBuilder>Span collections included in this segment.A string id represents the whole trace.com.google.protobuf.ByteStringA string id represents the whole trace.A unique id represents this segment.com.google.protobuf.ByteStringA unique id represents this segment.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(SegmentObject other) final SegmentObject.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeSpans(int index) Span collections included in this segment.setIsSizeLimited(boolean value) Whether the segment includes all tracked spans.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setService(String value) **Service**.setServiceBytes(com.google.protobuf.ByteString value) **Service**.setServiceInstance(String value) **Service Instance**.setServiceInstanceBytes(com.google.protobuf.ByteString value) **Service Instance**.setSpans(int index, SpanObject value) Span collections included in this segment.setSpans(int index, SpanObject.Builder builderForValue) Span collections included in this segment.setTraceId(String value) A string id represents the whole trace.setTraceIdBytes(com.google.protobuf.ByteString value) A string id represents the whole trace.setTraceSegmentId(String value) A unique id represents this segment.setTraceSegmentIdBytes(com.google.protobuf.ByteString value) A unique id represents this segment.final SegmentObject.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
setField
public SegmentObject.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
setRepeatedField
public SegmentObject.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
addRepeatedField
public SegmentObject.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SegmentObject.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
mergeFrom
public SegmentObject.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SegmentObject.Builder>- Throws:
IOException
-
getTraceId
A string id represents the whole trace.
string traceId = 1;- Specified by:
getTraceIdin interfaceSegmentObjectOrBuilder- Returns:
- The traceId.
-
getTraceIdBytes
public com.google.protobuf.ByteString getTraceIdBytes()A string id represents the whole trace.
string traceId = 1;- Specified by:
getTraceIdBytesin interfaceSegmentObjectOrBuilder- Returns:
- The bytes for traceId.
-
setTraceId
A string id represents the whole trace.
string traceId = 1;- Parameters:
value- The traceId to set.- Returns:
- This builder for chaining.
-
clearTraceId
A string id represents the whole trace.
string traceId = 1;- Returns:
- This builder for chaining.
-
setTraceIdBytes
A string id represents the whole trace.
string traceId = 1;- Parameters:
value- The bytes for traceId to set.- Returns:
- This builder for chaining.
-
getTraceSegmentId
A unique id represents this segment. Other segments could use this id to reference as a child segment.
string traceSegmentId = 2;- Specified by:
getTraceSegmentIdin interfaceSegmentObjectOrBuilder- Returns:
- The traceSegmentId.
-
getTraceSegmentIdBytes
public com.google.protobuf.ByteString getTraceSegmentIdBytes()A unique id represents this segment. Other segments could use this id to reference as a child segment.
string traceSegmentId = 2;- Specified by:
getTraceSegmentIdBytesin interfaceSegmentObjectOrBuilder- Returns:
- The bytes for traceSegmentId.
-
setTraceSegmentId
A unique id represents this segment. Other segments could use this id to reference as a child segment.
string traceSegmentId = 2;- Parameters:
value- The traceSegmentId to set.- Returns:
- This builder for chaining.
-
clearTraceSegmentId
A unique id represents this segment. Other segments could use this id to reference as a child segment.
string traceSegmentId = 2;- Returns:
- This builder for chaining.
-
setTraceSegmentIdBytes
A unique id represents this segment. Other segments could use this id to reference as a child segment.
string traceSegmentId = 2;- Parameters:
value- The bytes for traceSegmentId to set.- Returns:
- This builder for chaining.
-
getSpansList
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3;- Specified by:
getSpansListin interfaceSegmentObjectOrBuilder
-
getSpansCount
public int getSpansCount()Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3;- Specified by:
getSpansCountin interfaceSegmentObjectOrBuilder
-
getSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3;- Specified by:
getSpansin interfaceSegmentObjectOrBuilder
-
setSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
setSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addAllSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
clearSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
removeSpans
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
getSpansBuilder
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
getSpansOrBuilder
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3;- Specified by:
getSpansOrBuilderin interfaceSegmentObjectOrBuilder
-
getSpansOrBuilderList
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3;- Specified by:
getSpansOrBuilderListin interfaceSegmentObjectOrBuilder
-
addSpansBuilder
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
addSpansBuilder
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
getSpansBuilderList
Span collections included in this segment.
repeated .skywalking.v3.SpanObject spans = 3; -
getService
**Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests. The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
string service = 4;- Specified by:
getServicein interfaceSegmentObjectOrBuilder- Returns:
- The service.
-
getServiceBytes
public com.google.protobuf.ByteString getServiceBytes()**Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests. The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
string service = 4;- Specified by:
getServiceBytesin interfaceSegmentObjectOrBuilder- Returns:
- The bytes for service.
-
setService
**Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests. The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
string service = 4;- Parameters:
value- The service to set.- Returns:
- This builder for chaining.
-
clearService
**Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests. The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
string service = 4;- Returns:
- This builder for chaining.
-
setServiceBytes
**Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests. The logic name represents the service. This would show as a separate node in the topology. The metrics analyzed from the spans, would be aggregated for this entity as the service level.
string service = 4;- Parameters:
value- The bytes for service to set.- Returns:
- This builder for chaining.
-
getServiceInstance
**Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process. The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
string serviceInstance = 5;- Specified by:
getServiceInstancein interfaceSegmentObjectOrBuilder- Returns:
- The serviceInstance.
-
getServiceInstanceBytes
public com.google.protobuf.ByteString getServiceInstanceBytes()**Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process. The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
string serviceInstance = 5;- Specified by:
getServiceInstanceBytesin interfaceSegmentObjectOrBuilder- Returns:
- The bytes for serviceInstance.
-
setServiceInstance
**Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process. The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
string serviceInstance = 5;- Parameters:
value- The serviceInstance to set.- Returns:
- This builder for chaining.
-
clearServiceInstance
**Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process. The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
string serviceInstance = 5;- Returns:
- This builder for chaining.
-
setServiceInstanceBytes
**Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process. The logic name represents the service instance. This would show as a separate node in the instance relationship. The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
string serviceInstance = 5;- Parameters:
value- The bytes for serviceInstance to set.- Returns:
- This builder for chaining.
-
getIsSizeLimited
public boolean getIsSizeLimited()Whether the segment includes all tracked spans. In the production environment tracked, some tasks could include too many spans for one request context, such as a batch update for a cache, or an async job. The agent/SDK could optimize or ignore some tracked spans for better performance. In this case, the value should be flagged as TRUE.
bool isSizeLimited = 6;- Specified by:
getIsSizeLimitedin interfaceSegmentObjectOrBuilder- Returns:
- The isSizeLimited.
-
setIsSizeLimited
Whether the segment includes all tracked spans. In the production environment tracked, some tasks could include too many spans for one request context, such as a batch update for a cache, or an async job. The agent/SDK could optimize or ignore some tracked spans for better performance. In this case, the value should be flagged as TRUE.
bool isSizeLimited = 6;- Parameters:
value- The isSizeLimited to set.- Returns:
- This builder for chaining.
-
clearIsSizeLimited
Whether the segment includes all tracked spans. In the production environment tracked, some tasks could include too many spans for one request context, such as a batch update for a cache, or an async job. The agent/SDK could optimize or ignore some tracked spans for better performance. In this case, the value should be flagged as TRUE.
bool isSizeLimited = 6;- Returns:
- This builder for chaining.
-
setUnknownFields
public final SegmentObject.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-
mergeUnknownFields
public final SegmentObject.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SegmentObject.Builder>
-