Class Sample
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.opentelemetry.proto.profiles.v1development.Sample
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,SampleOrBuilder,Serializable
@Generated
public final class Sample
extends com.google.protobuf.GeneratedMessage
implements SampleOrBuilder
Each Sample records values encountered in some program context. The program
context is typically a stack trace, perhaps augmented with auxiliary
information like the thread-id, some indicator of a higher level request
being handled etc.
A Sample MUST have have at least one entry in values or timestamps_unix_nano.
If both fields are populated, they MUST contain the same number of elements,
and the elements at the same index MUST refer to the same event.
For the purposes of efficiently representing aggregated data observations, a Sample is regarded
as having a shared identity and an associated collection of per-observation data points.
A Sample's identity (i.e. primary key) is the tuple of {stack_index, set_of(attribute_indices), link_index}.
Samples having the same identity SHOULD be combined by appending timestamps and values to the data arrays.
Examples of different ways ('shapes') of representing a sample with the total value of 10:
Timestamps only (consumers must assume the value is 1 for each timestamp):
values: []
timestamps_unix_nano: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Single aggregated value without timestamps (one element representing the total):
values: [10]
timestamps_unix_nano: []
Per-timestamp value (each point in time records a specific value):
values: [2, 2, 3, 3]
timestamps_unix_nano: [1, 2, 3, 4]
All Samples for a Profile SHOULD have the same shape, i.e. all data observation series should consistently
adopt the same data recording style.
Status: [Alpha]
Protobuf type opentelemetry.proto.profiles.v1development.Sample- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEach Sample records values encountered in some program context.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetAttributeIndices(int index) References to attributes in ProfilesDictionary.attribute_table.intReferences to attributes in ProfilesDictionary.attribute_table.References to attributes in ProfilesDictionary.attribute_table.static Samplestatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintReference to link in ProfilesDictionary.link_table.com.google.protobuf.Parser<Sample>intintReference to stack in ProfilesDictionary.stack_table.longgetTimestampsUnixNano(int index) Timestamps (UTC) as nanoseconds since the UNIX epoch.intTimestamps (UTC) as nanoseconds since the UNIX epoch.Timestamps (UTC) as nanoseconds since the UNIX epoch.longgetValues(int index) Measured values.intMeasured values.Measured values.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Sample.Builderstatic Sample.BuildernewBuilder(Sample prototype) protected Sample.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static SampleparseDelimitedFrom(InputStream input) static SampleparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SampleparseFrom(byte[] data) static SampleparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SampleparseFrom(com.google.protobuf.ByteString data) static SampleparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SampleparseFrom(com.google.protobuf.CodedInputStream input) static SampleparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SampleparseFrom(InputStream input) static SampleparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SampleparseFrom(ByteBuffer data) static SampleparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Sample>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
STACK_INDEX_FIELD_NUMBER
public static final int STACK_INDEX_FIELD_NUMBER- See Also:
-
ATTRIBUTE_INDICES_FIELD_NUMBER
public static final int ATTRIBUTE_INDICES_FIELD_NUMBER- See Also:
-
LINK_INDEX_FIELD_NUMBER
public static final int LINK_INDEX_FIELD_NUMBER- See Also:
-
VALUES_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER- See Also:
-
TIMESTAMPS_UNIX_NANO_FIELD_NUMBER
public static final int TIMESTAMPS_UNIX_NANO_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getStackIndex
public int getStackIndex()Reference to stack in ProfilesDictionary.stack_table.
int32 stack_index = 1;- Specified by:
getStackIndexin interfaceSampleOrBuilder- Returns:
- The stackIndex.
-
getAttributeIndicesList
References to attributes in ProfilesDictionary.attribute_table. [optional]
repeated int32 attribute_indices = 2;- Specified by:
getAttributeIndicesListin interfaceSampleOrBuilder- Returns:
- A list containing the attributeIndices.
-
getAttributeIndicesCount
public int getAttributeIndicesCount()References to attributes in ProfilesDictionary.attribute_table. [optional]
repeated int32 attribute_indices = 2;- Specified by:
getAttributeIndicesCountin interfaceSampleOrBuilder- Returns:
- The count of attributeIndices.
-
getAttributeIndices
public int getAttributeIndices(int index) References to attributes in ProfilesDictionary.attribute_table. [optional]
repeated int32 attribute_indices = 2;- Specified by:
getAttributeIndicesin interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The attributeIndices at the given index.
-
getLinkIndex
public int getLinkIndex()Reference to link in ProfilesDictionary.link_table. [optional] 0 means no link exists.
int32 link_index = 3;- Specified by:
getLinkIndexin interfaceSampleOrBuilder- Returns:
- The linkIndex.
-
getValuesList
Measured values. The type and unit of each value is defined by Profile.sample_type.
repeated int64 values = 4;- Specified by:
getValuesListin interfaceSampleOrBuilder- Returns:
- A list containing the values.
-
getValuesCount
public int getValuesCount()Measured values. The type and unit of each value is defined by Profile.sample_type.
repeated int64 values = 4;- Specified by:
getValuesCountin interfaceSampleOrBuilder- Returns:
- The count of values.
-
getValues
public long getValues(int index) Measured values. The type and unit of each value is defined by Profile.sample_type.
repeated int64 values = 4;- Specified by:
getValuesin interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The values at the given index.
-
getTimestampsUnixNanoList
Timestamps (UTC) as nanoseconds since the UNIX epoch. The timestamps SHOULD fall within the [Profile.time_unix_nano, Profile.time_unix_nano + Profile.duration_nano) interval.
repeated fixed64 timestamps_unix_nano = 5;- Specified by:
getTimestampsUnixNanoListin interfaceSampleOrBuilder- Returns:
- A list containing the timestampsUnixNano.
-
getTimestampsUnixNanoCount
public int getTimestampsUnixNanoCount()Timestamps (UTC) as nanoseconds since the UNIX epoch. The timestamps SHOULD fall within the [Profile.time_unix_nano, Profile.time_unix_nano + Profile.duration_nano) interval.
repeated fixed64 timestamps_unix_nano = 5;- Specified by:
getTimestampsUnixNanoCountin interfaceSampleOrBuilder- Returns:
- The count of timestampsUnixNano.
-
getTimestampsUnixNano
public long getTimestampsUnixNano(int index) Timestamps (UTC) as nanoseconds since the UNIX epoch. The timestamps SHOULD fall within the [Profile.time_unix_nano, Profile.time_unix_nano + Profile.duration_nano) interval.
repeated fixed64 timestamps_unix_nano = 5;- Specified by:
getTimestampsUnixNanoin interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The timestampsUnixNano at the given index.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Sample parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Sample parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Sample parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Sample parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Sample parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Sample parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Sample parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Sample parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Sample parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Sample.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-