java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.opentelemetry.proto.profiles.v1development.Profile
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ProfileOrBuilder, Serializable

@Generated public final class Profile extends com.google.protobuf.GeneratedMessage implements ProfileOrBuilder
 Represents a complete profile, including sample types, samples,
 mappings to binaries, locations, functions, string table, and additional metadata.
 It modifies and annotates pprof Profile with OpenTelemetry specific fields.

 Note that whilst fields in this message retain the name and field id from pprof in most cases
 for ease of understanding data migration, it is not intended that pprof:Profile and
 OpenTelemetry:Profile encoding be wire compatible.
 
Protobuf type opentelemetry.proto.profiles.v1development.Profile
See Also:
  • Field Details

    • SAMPLE_TYPE_FIELD_NUMBER

      public static final int SAMPLE_TYPE_FIELD_NUMBER
      See Also:
    • SAMPLE_FIELD_NUMBER

      public static final int SAMPLE_FIELD_NUMBER
      See Also:
    • LOCATION_INDICES_FIELD_NUMBER

      public static final int LOCATION_INDICES_FIELD_NUMBER
      See Also:
    • TIME_NANOS_FIELD_NUMBER

      public static final int TIME_NANOS_FIELD_NUMBER
      See Also:
    • DURATION_NANOS_FIELD_NUMBER

      public static final int DURATION_NANOS_FIELD_NUMBER
      See Also:
    • PERIOD_TYPE_FIELD_NUMBER

      public static final int PERIOD_TYPE_FIELD_NUMBER
      See Also:
    • PERIOD_FIELD_NUMBER

      public static final int PERIOD_FIELD_NUMBER
      See Also:
    • COMMENT_STRINDICES_FIELD_NUMBER

      public static final int COMMENT_STRINDICES_FIELD_NUMBER
      See Also:
    • DEFAULT_SAMPLE_TYPE_INDEX_FIELD_NUMBER

      public static final int DEFAULT_SAMPLE_TYPE_INDEX_FIELD_NUMBER
      See Also:
    • PROFILE_ID_FIELD_NUMBER

      public static final int PROFILE_ID_FIELD_NUMBER
      See Also:
    • DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER

      public static final int DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER
      See Also:
    • ORIGINAL_PAYLOAD_FORMAT_FIELD_NUMBER

      public static final int ORIGINAL_PAYLOAD_FORMAT_FIELD_NUMBER
      See Also:
    • ORIGINAL_PAYLOAD_FIELD_NUMBER

      public static final int ORIGINAL_PAYLOAD_FIELD_NUMBER
      See Also:
    • ATTRIBUTE_INDICES_FIELD_NUMBER

      public static final int ATTRIBUTE_INDICES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getSampleTypeList

      public List<ValueType> getSampleTypeList()
       A description of the samples associated with each Sample.value.
       For a cpu profile this might be:
       [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
       For a heap profile, this might be:
       [["allocations","count"], ["space","bytes"]],
       If one of the values represents the number of events represented
       by the sample, by convention it should be at index 0 and use
       sample_type.unit == "count".
       
      repeated .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;
      Specified by:
      getSampleTypeList in interface ProfileOrBuilder
    • getSampleTypeOrBuilderList

      public List<? extends ValueTypeOrBuilder> getSampleTypeOrBuilderList()
       A description of the samples associated with each Sample.value.
       For a cpu profile this might be:
       [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
       For a heap profile, this might be:
       [["allocations","count"], ["space","bytes"]],
       If one of the values represents the number of events represented
       by the sample, by convention it should be at index 0 and use
       sample_type.unit == "count".
       
      repeated .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;
      Specified by:
      getSampleTypeOrBuilderList in interface ProfileOrBuilder
    • getSampleTypeCount

      public int getSampleTypeCount()
       A description of the samples associated with each Sample.value.
       For a cpu profile this might be:
       [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
       For a heap profile, this might be:
       [["allocations","count"], ["space","bytes"]],
       If one of the values represents the number of events represented
       by the sample, by convention it should be at index 0 and use
       sample_type.unit == "count".
       
      repeated .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;
      Specified by:
      getSampleTypeCount in interface ProfileOrBuilder
    • getSampleType

      public ValueType getSampleType(int index)
       A description of the samples associated with each Sample.value.
       For a cpu profile this might be:
       [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
       For a heap profile, this might be:
       [["allocations","count"], ["space","bytes"]],
       If one of the values represents the number of events represented
       by the sample, by convention it should be at index 0 and use
       sample_type.unit == "count".
       
      repeated .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;
      Specified by:
      getSampleType in interface ProfileOrBuilder
    • getSampleTypeOrBuilder

      public ValueTypeOrBuilder getSampleTypeOrBuilder(int index)
       A description of the samples associated with each Sample.value.
       For a cpu profile this might be:
       [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]]
       For a heap profile, this might be:
       [["allocations","count"], ["space","bytes"]],
       If one of the values represents the number of events represented
       by the sample, by convention it should be at index 0 and use
       sample_type.unit == "count".
       
      repeated .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;
      Specified by:
      getSampleTypeOrBuilder in interface ProfileOrBuilder
    • getSampleList

      public List<Sample> getSampleList()
       The set of samples recorded in this profile.
       
      repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;
      Specified by:
      getSampleList in interface ProfileOrBuilder
    • getSampleOrBuilderList

      public List<? extends SampleOrBuilder> getSampleOrBuilderList()
       The set of samples recorded in this profile.
       
      repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;
      Specified by:
      getSampleOrBuilderList in interface ProfileOrBuilder
    • getSampleCount

      public int getSampleCount()
       The set of samples recorded in this profile.
       
      repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;
      Specified by:
      getSampleCount in interface ProfileOrBuilder
    • getSample

      public Sample getSample(int index)
       The set of samples recorded in this profile.
       
      repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;
      Specified by:
      getSample in interface ProfileOrBuilder
    • getSampleOrBuilder

      public SampleOrBuilder getSampleOrBuilder(int index)
       The set of samples recorded in this profile.
       
      repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;
      Specified by:
      getSampleOrBuilder in interface ProfileOrBuilder
    • getLocationIndicesList

      public List<Integer> getLocationIndicesList()
       References to locations in ProfilesDictionary.location_table.
       
      repeated int32 location_indices = 3;
      Specified by:
      getLocationIndicesList in interface ProfileOrBuilder
      Returns:
      A list containing the locationIndices.
    • getLocationIndicesCount

      public int getLocationIndicesCount()
       References to locations in ProfilesDictionary.location_table.
       
      repeated int32 location_indices = 3;
      Specified by:
      getLocationIndicesCount in interface ProfileOrBuilder
      Returns:
      The count of locationIndices.
    • getLocationIndices

      public int getLocationIndices(int index)
       References to locations in ProfilesDictionary.location_table.
       
      repeated int32 location_indices = 3;
      Specified by:
      getLocationIndices in interface ProfileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The locationIndices at the given index.
    • getTimeNanos

      public long getTimeNanos()
       Time of collection (UTC) represented as nanoseconds past the epoch.
       
      int64 time_nanos = 4;
      Specified by:
      getTimeNanos in interface ProfileOrBuilder
      Returns:
      The timeNanos.
    • getDurationNanos

      public long getDurationNanos()
       Duration of the profile, if a duration makes sense.
       
      int64 duration_nanos = 5;
      Specified by:
      getDurationNanos in interface ProfileOrBuilder
      Returns:
      The durationNanos.
    • hasPeriodType

      public boolean hasPeriodType()
       The kind of events between sampled occurrences.
       e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
       
      .opentelemetry.proto.profiles.v1development.ValueType period_type = 6;
      Specified by:
      hasPeriodType in interface ProfileOrBuilder
      Returns:
      Whether the periodType field is set.
    • getPeriodType

      public ValueType getPeriodType()
       The kind of events between sampled occurrences.
       e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
       
      .opentelemetry.proto.profiles.v1development.ValueType period_type = 6;
      Specified by:
      getPeriodType in interface ProfileOrBuilder
      Returns:
      The periodType.
    • getPeriodTypeOrBuilder

      public ValueTypeOrBuilder getPeriodTypeOrBuilder()
       The kind of events between sampled occurrences.
       e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
       
      .opentelemetry.proto.profiles.v1development.ValueType period_type = 6;
      Specified by:
      getPeriodTypeOrBuilder in interface ProfileOrBuilder
    • getPeriod

      public long getPeriod()
       The number of events between sampled occurrences.
       
      int64 period = 7;
      Specified by:
      getPeriod in interface ProfileOrBuilder
      Returns:
      The period.
    • getCommentStrindicesList

      public List<Integer> getCommentStrindicesList()
       Free-form text associated with the profile. The text is displayed as is
       to the user by the tools that read profiles (e.g. by pprof). This field
       should not be used to store any machine-readable information, it is only
       for human-friendly content. The profile must stay functional if this field
       is cleaned.
       
      repeated int32 comment_strindices = 8;
      Specified by:
      getCommentStrindicesList in interface ProfileOrBuilder
      Returns:
      A list containing the commentStrindices.
    • getCommentStrindicesCount

      public int getCommentStrindicesCount()
       Free-form text associated with the profile. The text is displayed as is
       to the user by the tools that read profiles (e.g. by pprof). This field
       should not be used to store any machine-readable information, it is only
       for human-friendly content. The profile must stay functional if this field
       is cleaned.
       
      repeated int32 comment_strindices = 8;
      Specified by:
      getCommentStrindicesCount in interface ProfileOrBuilder
      Returns:
      The count of commentStrindices.
    • getCommentStrindices

      public int getCommentStrindices(int index)
       Free-form text associated with the profile. The text is displayed as is
       to the user by the tools that read profiles (e.g. by pprof). This field
       should not be used to store any machine-readable information, it is only
       for human-friendly content. The profile must stay functional if this field
       is cleaned.
       
      repeated int32 comment_strindices = 8;
      Specified by:
      getCommentStrindices in interface ProfileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The commentStrindices at the given index.
    • getDefaultSampleTypeIndex

      public int getDefaultSampleTypeIndex()
       Index into the sample_type array to the default sample type.
       
      int32 default_sample_type_index = 9;
      Specified by:
      getDefaultSampleTypeIndex in interface ProfileOrBuilder
      Returns:
      The defaultSampleTypeIndex.
    • getProfileId

      public com.google.protobuf.ByteString getProfileId()
       A globally unique identifier for a profile. The ID is a 16-byte array. An ID with
       all zeroes is considered invalid.
      
       This field is required.
       
      bytes profile_id = 10;
      Specified by:
      getProfileId in interface ProfileOrBuilder
      Returns:
      The profileId.
    • getDroppedAttributesCount

      public int getDroppedAttributesCount()
       dropped_attributes_count is the number of attributes that were discarded. Attributes
       can be discarded because their keys are too long or because there are too many
       attributes. If this value is 0, then no attributes were dropped.
       
      uint32 dropped_attributes_count = 11;
      Specified by:
      getDroppedAttributesCount in interface ProfileOrBuilder
      Returns:
      The droppedAttributesCount.
    • getOriginalPayloadFormat

      public String getOriginalPayloadFormat()
       Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
       
      string original_payload_format = 12;
      Specified by:
      getOriginalPayloadFormat in interface ProfileOrBuilder
      Returns:
      The originalPayloadFormat.
    • getOriginalPayloadFormatBytes

      public com.google.protobuf.ByteString getOriginalPayloadFormatBytes()
       Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
       
      string original_payload_format = 12;
      Specified by:
      getOriginalPayloadFormatBytes in interface ProfileOrBuilder
      Returns:
      The bytes for originalPayloadFormat.
    • getOriginalPayload

      public com.google.protobuf.ByteString getOriginalPayload()
       Original payload can be stored in this field. This can be useful for users who want to get the original payload.
       Formats such as JFR are highly extensible and can contain more information than what is defined in this spec.
       Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload.
       If the original payload is in pprof format, it SHOULD not be included in this field.
       The field is optional, however if it is present then equivalent converted data should be populated in other fields
       of this message as far as is practicable.
       
      bytes original_payload = 13;
      Specified by:
      getOriginalPayload in interface ProfileOrBuilder
      Returns:
      The originalPayload.
    • getAttributeIndicesList

      public List<Integer> getAttributeIndicesList()
       References to attributes in attribute_table. [optional]
       It is a collection of key/value pairs. Note, global attributes
       like server name can be set using the resource API. Examples of attributes:
      
       "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
       "/http/server_latency": 300
       "abc.com/myattribute": true
       "abc.com/score": 10.239
      
       The OpenTelemetry API specification further restricts the allowed value types:
       https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated int32 attribute_indices = 14;
      Specified by:
      getAttributeIndicesList in interface ProfileOrBuilder
      Returns:
      A list containing the attributeIndices.
    • getAttributeIndicesCount

      public int getAttributeIndicesCount()
       References to attributes in attribute_table. [optional]
       It is a collection of key/value pairs. Note, global attributes
       like server name can be set using the resource API. Examples of attributes:
      
       "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
       "/http/server_latency": 300
       "abc.com/myattribute": true
       "abc.com/score": 10.239
      
       The OpenTelemetry API specification further restricts the allowed value types:
       https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated int32 attribute_indices = 14;
      Specified by:
      getAttributeIndicesCount in interface ProfileOrBuilder
      Returns:
      The count of attributeIndices.
    • getAttributeIndices

      public int getAttributeIndices(int index)
       References to attributes in attribute_table. [optional]
       It is a collection of key/value pairs. Note, global attributes
       like server name can be set using the resource API. Examples of attributes:
      
       "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
       "/http/server_latency": 300
       "abc.com/myattribute": true
       "abc.com/score": 10.239
      
       The OpenTelemetry API specification further restricts the allowed value types:
       https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated int32 attribute_indices = 14;
      Specified by:
      getAttributeIndices in interface ProfileOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The attributeIndices at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Profile parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Profile parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Profile parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Profile parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Profile parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Profile parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Profile parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Profile.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Profile.Builder newBuilder()
    • newBuilder

      public static Profile.Builder newBuilder(Profile prototype)
    • toBuilder

      public Profile.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Profile.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Profile getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Profile> parser()
    • getParserForType

      public com.google.protobuf.Parser<Profile> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Profile getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder