Class TraceSpan.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
- com.google.devtools.cloudtrace.v1.TraceSpan.Builder
-
- All Implemented Interfaces:
TraceSpanOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- TraceSpan
public static final class TraceSpan.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder> implements TraceSpanOrBuilder
A span represents a single timed event within a trace. Spans can be nested and form a trace tree. Often, a trace contains a root span that describes the end-to-end latency of an operation and, optionally, one or more subspans for its suboperations. Spans do not need to be contiguous. There may be gaps between spans in a trace.
Protobuf typegoogle.devtools.cloudtrace.v1.TraceSpan
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TraceSpan.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TraceSpan
build()
TraceSpan
buildPartial()
TraceSpan.Builder
clear()
TraceSpan.Builder
clearEndTime()
End time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TraceSpan.Builder
clearKind()
Distinguishes between spans generated in a particular context.TraceSpan.Builder
clearLabels()
TraceSpan.Builder
clearName()
Name of the span.TraceSpan.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TraceSpan.Builder
clearParentSpanId()
Optional.TraceSpan.Builder
clearSpanId()
Identifier for the span.TraceSpan.Builder
clearStartTime()
Start time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
clone()
boolean
containsLabels(String key)
Collection of labels associated with the span.TraceSpan
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
com.google.protobuf.Timestamp
getEndTime()
End time of the span in nanoseconds from the UNIX epoch.com.google.protobuf.Timestamp.Builder
getEndTimeBuilder()
End time of the span in nanoseconds from the UNIX epoch.com.google.protobuf.TimestampOrBuilder
getEndTimeOrBuilder()
End time of the span in nanoseconds from the UNIX epoch.TraceSpan.SpanKind
getKind()
Distinguishes between spans generated in a particular context.int
getKindValue()
Distinguishes between spans generated in a particular context.Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
Collection of labels associated with the span.Map<String,String>
getLabelsMap()
Collection of labels associated with the span.String
getLabelsOrDefault(String key, String defaultValue)
Collection of labels associated with the span.String
getLabelsOrThrow(String key)
Collection of labels associated with the span.Map<String,String>
getMutableLabels()
Deprecated.String
getName()
Name of the span.com.google.protobuf.ByteString
getNameBytes()
Name of the span.long
getParentSpanId()
Optional.long
getSpanId()
Identifier for the span.com.google.protobuf.Timestamp
getStartTime()
Start time of the span in nanoseconds from the UNIX epoch.com.google.protobuf.Timestamp.Builder
getStartTimeBuilder()
Start time of the span in nanoseconds from the UNIX epoch.com.google.protobuf.TimestampOrBuilder
getStartTimeOrBuilder()
Start time of the span in nanoseconds from the UNIX epoch.boolean
hasEndTime()
End time of the span in nanoseconds from the UNIX epoch.boolean
hasStartTime()
Start time of the span in nanoseconds from the UNIX epoch.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
TraceSpan.Builder
mergeEndTime(com.google.protobuf.Timestamp value)
End time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
mergeFrom(TraceSpan other)
TraceSpan.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
TraceSpan.Builder
mergeFrom(com.google.protobuf.Message other)
TraceSpan.Builder
mergeStartTime(com.google.protobuf.Timestamp value)
Start time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TraceSpan.Builder
putAllLabels(Map<String,String> values)
Collection of labels associated with the span.TraceSpan.Builder
putLabels(String key, String value)
Collection of labels associated with the span.TraceSpan.Builder
removeLabels(String key)
Collection of labels associated with the span.TraceSpan.Builder
setEndTime(com.google.protobuf.Timestamp value)
End time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
End time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TraceSpan.Builder
setKind(TraceSpan.SpanKind value)
Distinguishes between spans generated in a particular context.TraceSpan.Builder
setKindValue(int value)
Distinguishes between spans generated in a particular context.TraceSpan.Builder
setName(String value)
Name of the span.TraceSpan.Builder
setNameBytes(com.google.protobuf.ByteString value)
Name of the span.TraceSpan.Builder
setParentSpanId(long value)
Optional.TraceSpan.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
TraceSpan.Builder
setSpanId(long value)
Identifier for the span.TraceSpan.Builder
setStartTime(com.google.protobuf.Timestamp value)
Start time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
Start time of the span in nanoseconds from the UNIX epoch.TraceSpan.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
clear
public TraceSpan.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
getDefaultInstanceForType
public TraceSpan getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TraceSpan build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TraceSpan buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TraceSpan.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
setField
public TraceSpan.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
clearField
public TraceSpan.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
clearOneof
public TraceSpan.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
setRepeatedField
public TraceSpan.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
addRepeatedField
public TraceSpan.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
mergeFrom
public TraceSpan.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TraceSpan.Builder>
-
mergeFrom
public TraceSpan.Builder mergeFrom(TraceSpan other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
mergeFrom
public TraceSpan.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TraceSpan.Builder>
- Throws:
IOException
-
getSpanId
public long getSpanId()
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace. For example, `2205310701640571284`.
fixed64 span_id = 1;
- Specified by:
getSpanId
in interfaceTraceSpanOrBuilder
- Returns:
- The spanId.
-
setSpanId
public TraceSpan.Builder setSpanId(long value)
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace. For example, `2205310701640571284`.
fixed64 span_id = 1;
- Parameters:
value
- The spanId to set.- Returns:
- This builder for chaining.
-
clearSpanId
public TraceSpan.Builder clearSpanId()
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace. For example, `2205310701640571284`.
fixed64 span_id = 1;
- Returns:
- This builder for chaining.
-
getKindValue
public int getKindValue()
Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.
.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
- Specified by:
getKindValue
in interfaceTraceSpanOrBuilder
- Returns:
- The enum numeric value on the wire for kind.
-
setKindValue
public TraceSpan.Builder setKindValue(int value)
Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.
.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
- Parameters:
value
- The enum numeric value on the wire for kind to set.- Returns:
- This builder for chaining.
-
getKind
public TraceSpan.SpanKind getKind()
Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.
.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
- Specified by:
getKind
in interfaceTraceSpanOrBuilder
- Returns:
- The kind.
-
setKind
public TraceSpan.Builder setKind(TraceSpan.SpanKind value)
Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.
.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
- Parameters:
value
- The kind to set.- Returns:
- This builder for chaining.
-
clearKind
public TraceSpan.Builder clearKind()
Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `RPC_CLIENT` and `RPC_SERVER` to identify queueing latency associated with the span.
.google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
- Returns:
- This builder for chaining.
-
getName
public String getName()
Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Stackdriver Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
string name = 3;
- Specified by:
getName
in interfaceTraceSpanOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Stackdriver Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
string name = 3;
- Specified by:
getNameBytes
in interfaceTraceSpanOrBuilder
- Returns:
- The bytes for name.
-
setName
public TraceSpan.Builder setName(String value)
Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Stackdriver Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
string name = 3;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public TraceSpan.Builder clearName()
Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Stackdriver Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
string name = 3;
- Returns:
- This builder for chaining.
-
setNameBytes
public TraceSpan.Builder setNameBytes(com.google.protobuf.ByteString value)
Name of the span. Must be less than 128 bytes. The span name is sanitized and displayed in the Stackdriver Trace tool in the Google Cloud Platform Console. The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
string name = 3;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasStartTime
public boolean hasStartTime()
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
- Specified by:
hasStartTime
in interfaceTraceSpanOrBuilder
- Returns:
- Whether the startTime field is set.
-
getStartTime
public com.google.protobuf.Timestamp getStartTime()
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
- Specified by:
getStartTime
in interfaceTraceSpanOrBuilder
- Returns:
- The startTime.
-
setStartTime
public TraceSpan.Builder setStartTime(com.google.protobuf.Timestamp value)
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
-
setStartTime
public TraceSpan.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
-
mergeStartTime
public TraceSpan.Builder mergeStartTime(com.google.protobuf.Timestamp value)
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
-
clearStartTime
public TraceSpan.Builder clearStartTime()
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
-
getStartTimeBuilder
public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
-
getStartTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
Start time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp start_time = 4;
- Specified by:
getStartTimeOrBuilder
in interfaceTraceSpanOrBuilder
-
hasEndTime
public boolean hasEndTime()
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
- Specified by:
hasEndTime
in interfaceTraceSpanOrBuilder
- Returns:
- Whether the endTime field is set.
-
getEndTime
public com.google.protobuf.Timestamp getEndTime()
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
- Specified by:
getEndTime
in interfaceTraceSpanOrBuilder
- Returns:
- The endTime.
-
setEndTime
public TraceSpan.Builder setEndTime(com.google.protobuf.Timestamp value)
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
-
setEndTime
public TraceSpan.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
-
mergeEndTime
public TraceSpan.Builder mergeEndTime(com.google.protobuf.Timestamp value)
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
-
clearEndTime
public TraceSpan.Builder clearEndTime()
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
-
getEndTimeBuilder
public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
-
getEndTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
End time of the span in nanoseconds from the UNIX epoch.
.google.protobuf.Timestamp end_time = 5;
- Specified by:
getEndTimeOrBuilder
in interfaceTraceSpanOrBuilder
-
getParentSpanId
public long getParentSpanId()
Optional. ID of the parent span, if any.
fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getParentSpanId
in interfaceTraceSpanOrBuilder
- Returns:
- The parentSpanId.
-
setParentSpanId
public TraceSpan.Builder setParentSpanId(long value)
Optional. ID of the parent span, if any.
fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The parentSpanId to set.- Returns:
- This builder for chaining.
-
clearParentSpanId
public TraceSpan.Builder clearParentSpanId()
Optional. ID of the parent span, if any.
fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:TraceSpanOrBuilder
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
- Specified by:
getLabelsCount
in interfaceTraceSpanOrBuilder
-
containsLabels
public boolean containsLabels(String key)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
- Specified by:
containsLabels
in interfaceTraceSpanOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceTraceSpanOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
- Specified by:
getLabelsMap
in interfaceTraceSpanOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
- Specified by:
getLabelsOrDefault
in interfaceTraceSpanOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
- Specified by:
getLabelsOrThrow
in interfaceTraceSpanOrBuilder
-
clearLabels
public TraceSpan.Builder clearLabels()
-
removeLabels
public TraceSpan.Builder removeLabels(String key)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public TraceSpan.Builder putLabels(String key, String value)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
-
putAllLabels
public TraceSpan.Builder putAllLabels(Map<String,String> values)
Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`
map<string, string> labels = 7;
-
setUnknownFields
public final TraceSpan.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
mergeUnknownFields
public final TraceSpan.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TraceSpan.Builder>
-
-