public final class SpanObject extends com.google.protobuf.GeneratedMessageV3 implements SpanObjectOrBuilder
Span represents a execution unit in the system, with duration and many other attributes. Span could be a method, a RPC, MQ message produce or consume. In the practice, the span should be added when it is really necessary, to avoid payload overhead. We recommend to creating spans in across process(client/server of RPC/MQ) and across thread cases only.Protobuf type
skywalking.v3.SpanObject| Modifier and Type | Class and Description |
|---|---|
static class |
SpanObject.Builder
Span represents a execution unit in the system, with duration and many other attributes.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
COMPONENTID_FIELD_NUMBER |
static int |
ENDTIME_FIELD_NUMBER |
static int |
ISERROR_FIELD_NUMBER |
static int |
LOGS_FIELD_NUMBER |
static int |
OPERATIONNAME_FIELD_NUMBER |
static int |
PARENTSPANID_FIELD_NUMBER |
static int |
PEER_FIELD_NUMBER |
static int |
REFS_FIELD_NUMBER |
static int |
SKIPANALYSIS_FIELD_NUMBER |
static int |
SPANID_FIELD_NUMBER |
static int |
SPANLAYER_FIELD_NUMBER |
static int |
SPANTYPE_FIELD_NUMBER |
static int |
STARTTIME_FIELD_NUMBER |
static int |
TAGS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getComponentId()
Component id is a predefinited number id in the SkyWalking.
|
static SpanObject |
getDefaultInstance() |
SpanObject |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
long |
getEndTime()
End timestamp in milliseconds of this span,
measured between the current time and midnight, January 1, 1970 UTC.
|
boolean |
getIsError()
The status of the span.
|
Log |
getLogs(int index)
String key, String value pair with an accurate timestamp.
|
int |
getLogsCount()
String key, String value pair with an accurate timestamp.
|
List<Log> |
getLogsList()
String key, String value pair with an accurate timestamp.
|
LogOrBuilder |
getLogsOrBuilder(int index)
String key, String value pair with an accurate timestamp.
|
List<? extends LogOrBuilder> |
getLogsOrBuilderList()
String key, String value pair with an accurate timestamp.
|
String |
getOperationName()
A logic name represents this span.
|
com.google.protobuf.ByteString |
getOperationNameBytes()
A logic name represents this span.
|
int |
getParentSpanId()
The number id of the parent span in the whole segment.
|
com.google.protobuf.Parser<SpanObject> |
getParserForType() |
String |
getPeer()
Remote address of the peer in RPC/MQ case.
|
com.google.protobuf.ByteString |
getPeerBytes()
Remote address of the peer in RPC/MQ case.
|
SegmentReference |
getRefs(int index)
<Optional>
In the across thread and across process, these references targeting the parent segments.
|
int |
getRefsCount()
<Optional>
In the across thread and across process, these references targeting the parent segments.
|
List<SegmentReference> |
getRefsList()
<Optional>
In the across thread and across process, these references targeting the parent segments.
|
SegmentReferenceOrBuilder |
getRefsOrBuilder(int index)
<Optional>
In the across thread and across process, these references targeting the parent segments.
|
List<? extends SegmentReferenceOrBuilder> |
getRefsOrBuilderList()
<Optional>
In the across thread and across process, these references targeting the parent segments.
|
int |
getSerializedSize() |
boolean |
getSkipAnalysis()
Force the backend don't do analysis, if the value is TRUE.
|
int |
getSpanId()
The number id of the span.
|
SpanLayer |
getSpanLayer()
Span layer represent the component tech stack, related to the network tech.
|
int |
getSpanLayerValue()
Span layer represent the component tech stack, related to the network tech.
|
SpanType |
getSpanType()
Span type represents the role in the RPC context.
|
int |
getSpanTypeValue()
Span type represents the role in the RPC context.
|
long |
getStartTime()
Start timestamp in milliseconds of this span,
measured between the current time and midnight, January 1, 1970 UTC.
|
KeyStringValuePair |
getTags(int index)
String key, String value pair.
|
int |
getTagsCount()
String key, String value pair.
|
List<KeyStringValuePair> |
getTagsList()
String key, String value pair.
|
KeyStringValuePairOrBuilder |
getTagsOrBuilder(int index)
String key, String value pair.
|
List<? extends KeyStringValuePairOrBuilder> |
getTagsOrBuilderList()
String key, String value pair.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static SpanObject.Builder |
newBuilder() |
static SpanObject.Builder |
newBuilder(SpanObject prototype) |
SpanObject.Builder |
newBuilderForType() |
protected SpanObject.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static SpanObject |
parseDelimitedFrom(InputStream input) |
static SpanObject |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SpanObject |
parseFrom(byte[] data) |
static SpanObject |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SpanObject |
parseFrom(ByteBuffer data) |
static SpanObject |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SpanObject |
parseFrom(com.google.protobuf.ByteString data) |
static SpanObject |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SpanObject |
parseFrom(com.google.protobuf.CodedInputStream input) |
static SpanObject |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static SpanObject |
parseFrom(InputStream input) |
static SpanObject |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<SpanObject> |
parser() |
SpanObject.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int SPANID_FIELD_NUMBER
public static final int PARENTSPANID_FIELD_NUMBER
public static final int STARTTIME_FIELD_NUMBER
public static final int ENDTIME_FIELD_NUMBER
public static final int REFS_FIELD_NUMBER
public static final int OPERATIONNAME_FIELD_NUMBER
public static final int PEER_FIELD_NUMBER
public static final int SPANTYPE_FIELD_NUMBER
public static final int SPANLAYER_FIELD_NUMBER
public static final int COMPONENTID_FIELD_NUMBER
public static final int ISERROR_FIELD_NUMBER
public static final int TAGS_FIELD_NUMBER
public static final int LOGS_FIELD_NUMBER
public static final int SKIPANALYSIS_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getSpanId()
The number id of the span. Should be unique in the whole segment. Starting at 0.
int32 spanId = 1;getSpanId in interface SpanObjectOrBuilderpublic int getParentSpanId()
The number id of the parent span in the whole segment. -1 represents no parent span. Also, be known as the root/first span of the segment.
int32 parentSpanId = 2;getParentSpanId in interface SpanObjectOrBuilderpublic long getStartTime()
Start timestamp in milliseconds of this span, measured between the current time and midnight, January 1, 1970 UTC.
int64 startTime = 3;getStartTime in interface SpanObjectOrBuilderpublic long getEndTime()
End timestamp in milliseconds of this span, measured between the current time and midnight, January 1, 1970 UTC.
int64 endTime = 4;getEndTime in interface SpanObjectOrBuilderpublic List<SegmentReference> getRefsList()
<Optional> In the across thread and across process, these references targeting the parent segments. The references usually have only one element, but in batch consumer case, such as in MQ or async batch process, it could be multiple.
repeated .skywalking.v3.SegmentReference refs = 5;getRefsList in interface SpanObjectOrBuilderpublic List<? extends SegmentReferenceOrBuilder> getRefsOrBuilderList()
<Optional> In the across thread and across process, these references targeting the parent segments. The references usually have only one element, but in batch consumer case, such as in MQ or async batch process, it could be multiple.
repeated .skywalking.v3.SegmentReference refs = 5;getRefsOrBuilderList in interface SpanObjectOrBuilderpublic int getRefsCount()
<Optional> In the across thread and across process, these references targeting the parent segments. The references usually have only one element, but in batch consumer case, such as in MQ or async batch process, it could be multiple.
repeated .skywalking.v3.SegmentReference refs = 5;getRefsCount in interface SpanObjectOrBuilderpublic SegmentReference getRefs(int index)
<Optional> In the across thread and across process, these references targeting the parent segments. The references usually have only one element, but in batch consumer case, such as in MQ or async batch process, it could be multiple.
repeated .skywalking.v3.SegmentReference refs = 5;getRefs in interface SpanObjectOrBuilderpublic SegmentReferenceOrBuilder getRefsOrBuilder(int index)
<Optional> In the across thread and across process, these references targeting the parent segments. The references usually have only one element, but in batch consumer case, such as in MQ or async batch process, it could be multiple.
repeated .skywalking.v3.SegmentReference refs = 5;getRefsOrBuilder in interface SpanObjectOrBuilderpublic String getOperationName()
A logic name represents this span. We don't recommend to include the parameter, such as HTTP request parameters, as a part of the operation, especially this is the name of the entry span. All statistic for the endpoints are aggregated base on this name. Those parameters should be added in the tags if necessary. If in some cases, it have to be a part of the operation name, users should use the Group Parameterized Endpoints capability at the backend to get the meaningful metrics. Read https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/endpoint-grouping-rules.md
string operationName = 6;getOperationName in interface SpanObjectOrBuilderpublic com.google.protobuf.ByteString getOperationNameBytes()
A logic name represents this span. We don't recommend to include the parameter, such as HTTP request parameters, as a part of the operation, especially this is the name of the entry span. All statistic for the endpoints are aggregated base on this name. Those parameters should be added in the tags if necessary. If in some cases, it have to be a part of the operation name, users should use the Group Parameterized Endpoints capability at the backend to get the meaningful metrics. Read https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/endpoint-grouping-rules.md
string operationName = 6;getOperationNameBytes in interface SpanObjectOrBuilderpublic String getPeer()
Remote address of the peer in RPC/MQ case. This is required when spanType = Exit, as it is a part of the SkyWalking STAM(Streaming Topology Analysis Method). For more details, read https://wu-sheng.github.io/STAM/
string peer = 7;getPeer in interface SpanObjectOrBuilderpublic com.google.protobuf.ByteString getPeerBytes()
Remote address of the peer in RPC/MQ case. This is required when spanType = Exit, as it is a part of the SkyWalking STAM(Streaming Topology Analysis Method). For more details, read https://wu-sheng.github.io/STAM/
string peer = 7;getPeerBytes in interface SpanObjectOrBuilderpublic int getSpanTypeValue()
Span type represents the role in the RPC context.
.skywalking.v3.SpanType spanType = 8;getSpanTypeValue in interface SpanObjectOrBuilderpublic SpanType getSpanType()
Span type represents the role in the RPC context.
.skywalking.v3.SpanType spanType = 8;getSpanType in interface SpanObjectOrBuilderpublic int getSpanLayerValue()
Span layer represent the component tech stack, related to the network tech.
.skywalking.v3.SpanLayer spanLayer = 9;getSpanLayerValue in interface SpanObjectOrBuilderpublic SpanLayer getSpanLayer()
Span layer represent the component tech stack, related to the network tech.
.skywalking.v3.SpanLayer spanLayer = 9;getSpanLayer in interface SpanObjectOrBuilderpublic int getComponentId()
Component id is a predefinited number id in the SkyWalking. It represents the framework, tech stack used by this tracked span, such as Spring. All IDs are defined in the https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/component-libraries.yml Send a pull request if you want to add languages, components or mapping defintions, all public components could be accepted. Follow this doc for more details, https://github.com/apache/skywalking/blob/master/docs/en/guides/Component-library-settings.md
int32 componentId = 10;getComponentId in interface SpanObjectOrBuilderpublic boolean getIsError()
The status of the span. False means the tracked execution ends in the unexpected status. This affects the successful rate statistic in the backend. Exception or error code happened in the tracked process doesn't mean isError == true, the implementations of agent plugin and tracing SDK make the final decision.
bool isError = 11;getIsError in interface SpanObjectOrBuilderpublic List<KeyStringValuePair> getTagsList()
String key, String value pair. Tags provides more informance, includes parameters. In the OAP backend analysis, some special tag or tag combination could provide other advanced features. https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#special-span-tags
repeated .skywalking.v3.KeyStringValuePair tags = 12;getTagsList in interface SpanObjectOrBuilderpublic List<? extends KeyStringValuePairOrBuilder> getTagsOrBuilderList()
String key, String value pair. Tags provides more informance, includes parameters. In the OAP backend analysis, some special tag or tag combination could provide other advanced features. https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#special-span-tags
repeated .skywalking.v3.KeyStringValuePair tags = 12;getTagsOrBuilderList in interface SpanObjectOrBuilderpublic int getTagsCount()
String key, String value pair. Tags provides more informance, includes parameters. In the OAP backend analysis, some special tag or tag combination could provide other advanced features. https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#special-span-tags
repeated .skywalking.v3.KeyStringValuePair tags = 12;getTagsCount in interface SpanObjectOrBuilderpublic KeyStringValuePair getTags(int index)
String key, String value pair. Tags provides more informance, includes parameters. In the OAP backend analysis, some special tag or tag combination could provide other advanced features. https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#special-span-tags
repeated .skywalking.v3.KeyStringValuePair tags = 12;getTags in interface SpanObjectOrBuilderpublic KeyStringValuePairOrBuilder getTagsOrBuilder(int index)
String key, String value pair. Tags provides more informance, includes parameters. In the OAP backend analysis, some special tag or tag combination could provide other advanced features. https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#special-span-tags
repeated .skywalking.v3.KeyStringValuePair tags = 12;getTagsOrBuilder in interface SpanObjectOrBuilderpublic List<Log> getLogsList()
String key, String value pair with an accurate timestamp. Logging some events happening in the context of the span duration.
repeated .skywalking.v3.Log logs = 13;getLogsList in interface SpanObjectOrBuilderpublic List<? extends LogOrBuilder> getLogsOrBuilderList()
String key, String value pair with an accurate timestamp. Logging some events happening in the context of the span duration.
repeated .skywalking.v3.Log logs = 13;getLogsOrBuilderList in interface SpanObjectOrBuilderpublic int getLogsCount()
String key, String value pair with an accurate timestamp. Logging some events happening in the context of the span duration.
repeated .skywalking.v3.Log logs = 13;getLogsCount in interface SpanObjectOrBuilderpublic Log getLogs(int index)
String key, String value pair with an accurate timestamp. Logging some events happening in the context of the span duration.
repeated .skywalking.v3.Log logs = 13;getLogs in interface SpanObjectOrBuilderpublic LogOrBuilder getLogsOrBuilder(int index)
String key, String value pair with an accurate timestamp. Logging some events happening in the context of the span duration.
repeated .skywalking.v3.Log logs = 13;getLogsOrBuilder in interface SpanObjectOrBuilderpublic boolean getSkipAnalysis()
Force the backend don't do analysis, if the value is TRUE. The backend has its own configurations to follow or override this. Use this mostly because the agent/SDK could know more context of the service role.
bool skipAnalysis = 14;getSkipAnalysis in interface SpanObjectOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static SpanObject parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static SpanObject parseFrom(InputStream input) throws IOException
IOExceptionpublic static SpanObject parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SpanObject parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static SpanObject parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static SpanObject parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static SpanObject parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic SpanObject.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static SpanObject.Builder newBuilder()
public static SpanObject.Builder newBuilder(SpanObject prototype)
public SpanObject.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected SpanObject.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static SpanObject getDefaultInstance()
public static com.google.protobuf.Parser<SpanObject> parser()
public com.google.protobuf.Parser<SpanObject> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public SpanObject getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 The Apache Software Foundation. All rights reserved.