Package io.opentelemetry.proto.trace.v1
Class Span.Event.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Span.Event,Span.Event.Builder>
io.opentelemetry.proto.trace.v1.Span.Event.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,Span.EventOrBuilder,Cloneable
- Enclosing class:
- Span.Event
public static final class Span.Event.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<Span.Event,Span.Event.Builder>
implements Span.EventOrBuilder
Event is a time-stamped annotation of the span, consisting of user-supplied text description and key-value pairs.Protobuf type
opentelemetry.proto.trace.v1.Span.Event-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllAttributes(Iterable<? extends KeyValue> values) A collection of attribute key/value pairs on the event.addAttributes(int index, KeyValue value) A collection of attribute key/value pairs on the event.addAttributes(int index, KeyValue.Builder builderForValue) A collection of attribute key/value pairs on the event.addAttributes(KeyValue value) A collection of attribute key/value pairs on the event.addAttributes(KeyValue.Builder builderForValue) A collection of attribute key/value pairs on the event.A collection of attribute key/value pairs on the event.The number of dropped attributes.The name of the event.The time the event occurred.getAttributes(int index) A collection of attribute key/value pairs on the event.intA collection of attribute key/value pairs on the event.A collection of attribute key/value pairs on the event.intThe number of dropped attributes.getName()The name of the event.com.google.protobuf.ByteStringThe name of the event.longThe time the event occurred.removeAttributes(int index) A collection of attribute key/value pairs on the event.setAttributes(int index, KeyValue value) A collection of attribute key/value pairs on the event.setAttributes(int index, KeyValue.Builder builderForValue) A collection of attribute key/value pairs on the event.setDroppedAttributesCount(int value) The number of dropped attributes.The name of the event.setNameBytes(com.google.protobuf.ByteString value) The name of the event.setTimeUnixNano(long value) The time the event occurred.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getTimeUnixNano
public long getTimeUnixNano()The time the event occurred.
fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];- Specified by:
getTimeUnixNanoin interfaceSpan.EventOrBuilder- Returns:
- The timeUnixNano.
-
setTimeUnixNano
The time the event occurred.
fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];- Parameters:
value- The timeUnixNano to set.- Returns:
- This builder for chaining.
-
clearTimeUnixNano
The time the event occurred.
fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];- Returns:
- This builder for chaining.
-
getName
The name of the event. This field is semantically required to be set to non-empty string.
string name = 2 [json_name = "name"];- Specified by:
getNamein interfaceSpan.EventOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the event. This field is semantically required to be set to non-empty string.
string name = 2 [json_name = "name"];- Specified by:
getNameBytesin interfaceSpan.EventOrBuilder- Returns:
- The bytes for name.
-
setName
The name of the event. This field is semantically required to be set to non-empty string.
string name = 2 [json_name = "name"];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name of the event. This field is semantically required to be set to non-empty string.
string name = 2 [json_name = "name"];- Returns:
- This builder for chaining.
-
setNameBytes
The name of the event. This field is semantically required to be set to non-empty string.
string name = 2 [json_name = "name"];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getAttributesList
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];- Specified by:
getAttributesListin interfaceSpan.EventOrBuilder
-
getAttributesCount
public int getAttributesCount()A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];- Specified by:
getAttributesCountin interfaceSpan.EventOrBuilder
-
getAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];- Specified by:
getAttributesin interfaceSpan.EventOrBuilder
-
setAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
setAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
addAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
addAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
addAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
addAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
addAllAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
clearAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
removeAttributes
A collection of attribute key/value pairs on the event. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable.
repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"]; -
getDroppedAttributesCount
public int getDroppedAttributesCount()The number of dropped attributes. If the value is 0, then no attributes were dropped.
uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];- Specified by:
getDroppedAttributesCountin interfaceSpan.EventOrBuilder- Returns:
- The droppedAttributesCount.
-
setDroppedAttributesCount
The number of dropped attributes. If the value is 0, then no attributes were dropped.
uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];- Parameters:
value- The droppedAttributesCount to set.- Returns:
- This builder for chaining.
-
clearDroppedAttributesCount
The number of dropped attributes. If the value is 0, then no attributes were dropped.
uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];- Returns:
- This builder for chaining.
-