OpenTelemetry PHP

Profile extends Message
in package

Represents a complete profile, including sample types, samples, mappings to binaries, stacks, 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.

Generated from protobuf message opentelemetry.proto.profiles.v1development.Profile

Table of Contents

Properties

$dropped_attributes_count  : mixed
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.
$duration_nano  : mixed
Duration of the profile, if a duration makes sense.
$original_payload  : mixed
Original payload can be stored in this field. This can be useful for users who want to get the original payload.
$original_payload_format  : mixed
Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
$period  : mixed
The number of events between sampled occurrences.
$period_type  : mixed
The kind of events between sampled occurrences.
$profile_id  : mixed
A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.
$sample_type  : mixed
The type and unit of all Sample.values in this profile.
$time_unix_nano  : mixed
Time of collection (UTC) represented as nanoseconds past the epoch.
$attribute_indices  : mixed
References to attributes in attribute_table. [optional]
$comment_strindices  : mixed
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.
$sample  : mixed
The set of samples recorded in this profile.

Methods

__construct()  : mixed
Constructor.
clearPeriodType()  : mixed
clearSampleType()  : mixed
getAttributeIndices()  : RepeatedField
References to attributes in attribute_table. [optional]
getCommentStrindices()  : RepeatedField
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.
getDroppedAttributesCount()  : int
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.
getDurationNano()  : int|string
Duration of the profile, if a duration makes sense.
getOriginalPayload()  : string
Original payload can be stored in this field. This can be useful for users who want to get the original payload.
getOriginalPayloadFormat()  : string
Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
getPeriod()  : int|string
The number of events between sampled occurrences.
getPeriodType()  : ValueType|null
The kind of events between sampled occurrences.
getProfileId()  : string
A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.
getSample()  : RepeatedField
The set of samples recorded in this profile.
getSampleType()  : ValueType|null
The type and unit of all Sample.values in this profile.
getTimeUnixNano()  : int|string
Time of collection (UTC) represented as nanoseconds past the epoch.
hasPeriodType()  : mixed
hasSampleType()  : mixed
setAttributeIndices()  : $this
References to attributes in attribute_table. [optional]
setCommentStrindices()  : $this
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.
setDroppedAttributesCount()  : $this
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.
setDurationNano()  : $this
Duration of the profile, if a duration makes sense.
setOriginalPayload()  : $this
Original payload can be stored in this field. This can be useful for users who want to get the original payload.
setOriginalPayloadFormat()  : $this
Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
setPeriod()  : $this
The number of events between sampled occurrences.
setPeriodType()  : $this
The kind of events between sampled occurrences.
setProfileId()  : $this
A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.
setSample()  : $this
The set of samples recorded in this profile.
setSampleType()  : $this
The type and unit of all Sample.values in this profile.
setTimeUnixNano()  : $this
Time of collection (UTC) represented as nanoseconds past the epoch.

Properties

$dropped_attributes_count

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.

protected mixed $dropped_attributes_count = 0

Generated from protobuf field uint32 dropped_attributes_count = 9;

$duration_nano

Duration of the profile, if a duration makes sense.

protected mixed $duration_nano = 0

Generated from protobuf field uint64 duration_nano = 4;

$original_payload

Original payload can be stored in this field. This can be useful for users who want to get the original payload.

protected mixed $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.

Generated from protobuf field bytes original_payload = 11;

$original_payload_format

Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]

protected mixed $original_payload_format = ''

Generated from protobuf field string original_payload_format = 10;

$period

The number of events between sampled occurrences.

protected mixed $period = 0

Generated from protobuf field int64 period = 6;

$period_type

The kind of events between sampled occurrences.

protected mixed $period_type = null

e.g [ "cpu","cycles" ] or [ "heap","bytes" ]

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType period_type = 5;

$profile_id

A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.

protected mixed $profile_id = ''

This field is optional; an ID may be assigned to an ID-less profile in a later step.

Generated from protobuf field bytes profile_id = 8;

$sample_type

The type and unit of all Sample.values in this profile.

protected mixed $sample_type = null

For a cpu or off-cpu profile this might be: ["cpu","nanoseconds"] or ["off_cpu","nanoseconds"] For a heap profile, this might be: ["allocated_objects","count"] or ["allocated_space","bytes"],

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;

$time_unix_nano

Time of collection (UTC) represented as nanoseconds past the epoch.

protected mixed $time_unix_nano = 0

Generated from protobuf field fixed64 time_unix_nano = 3;

$attribute_indices

References to attributes in attribute_table. [optional]

private mixed $attribute_indices

Generated from protobuf field repeated int32 attribute_indices = 12;

$comment_strindices

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.

private mixed $comment_strindices

Generated from protobuf field repeated int32 comment_strindices = 7;

$sample

The set of samples recorded in this profile.

private mixed $sample

Generated from protobuf field repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
$data : array<string|int, mixed> = null

{ Optional. Data for populating the Message object.

@type \Opentelemetry\Proto\Profiles\V1development\ValueType $sample_type
      The type and unit of all Sample.values in this profile.
      For a cpu or off-cpu profile this might be:
        ["cpu","nanoseconds"] or ["off_cpu","nanoseconds"]
      For a heap profile, this might be:
        ["allocated_objects","count"] or ["allocated_space","bytes"],
@type \Opentelemetry\Proto\Profiles\V1development\Sample[]|\Google\Protobuf\Internal\RepeatedField $sample
      The set of samples recorded in this profile.
@type int|string $time_unix_nano
      Time of collection (UTC) represented as nanoseconds past the epoch.
@type int|string $duration_nano
      Duration of the profile, if a duration makes sense.
@type \Opentelemetry\Proto\Profiles\V1development\ValueType $period_type
      The kind of events between sampled occurrences.
      e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
@type int|string $period
      The number of events between sampled occurrences.
@type int[]|\Google\Protobuf\Internal\RepeatedField $comment_strindices
      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.
@type string $profile_id
      A globally unique identifier for a profile. The ID is a 16-byte array. An ID with
      all zeroes is considered invalid. It may be used for deduplication and signal
      correlation purposes. It is acceptable to treat two profiles with different values
      in this field as not equal, even if they represented the same object at an earlier
      time.
      This field is optional; an ID may be assigned to an ID-less profile in a later step.
@type int $dropped_attributes_count
      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.
@type string $original_payload_format
      Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]
@type string $original_payload
      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.
@type int[]|\Google\Protobuf\Internal\RepeatedField $attribute_indices
      References to attributes in attribute_table. [optional]

}

clearPeriodType()

public clearPeriodType() : mixed

clearSampleType()

public clearSampleType() : mixed

getAttributeIndices()

References to attributes in attribute_table. [optional]

public getAttributeIndices() : RepeatedField

Generated from protobuf field repeated int32 attribute_indices = 12;

Return values
RepeatedField

getCommentStrindices()

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.

public getCommentStrindices() : RepeatedField

Generated from protobuf field repeated int32 comment_strindices = 7;

Return values
RepeatedField

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.

public getDroppedAttributesCount() : int

Generated from protobuf field uint32 dropped_attributes_count = 9;

Return values
int

getDurationNano()

Duration of the profile, if a duration makes sense.

public getDurationNano() : int|string

Generated from protobuf field uint64 duration_nano = 4;

Return values
int|string

getOriginalPayload()

Original payload can be stored in this field. This can be useful for users who want to get the original payload.

public getOriginalPayload() : string

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.

Generated from protobuf field bytes original_payload = 11;

Return values
string

getOriginalPayloadFormat()

Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]

public getOriginalPayloadFormat() : string

Generated from protobuf field string original_payload_format = 10;

Return values
string

getPeriod()

The number of events between sampled occurrences.

public getPeriod() : int|string

Generated from protobuf field int64 period = 6;

Return values
int|string

getPeriodType()

The kind of events between sampled occurrences.

public getPeriodType() : ValueType|null

e.g [ "cpu","cycles" ] or [ "heap","bytes" ]

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType period_type = 5;

Return values
ValueType|null

getProfileId()

A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.

public getProfileId() : string

This field is optional; an ID may be assigned to an ID-less profile in a later step.

Generated from protobuf field bytes profile_id = 8;

Return values
string

getSample()

The set of samples recorded in this profile.

public getSample() : RepeatedField

Generated from protobuf field repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;

Return values
RepeatedField

getSampleType()

The type and unit of all Sample.values in this profile.

public getSampleType() : ValueType|null

For a cpu or off-cpu profile this might be: ["cpu","nanoseconds"] or ["off_cpu","nanoseconds"] For a heap profile, this might be: ["allocated_objects","count"] or ["allocated_space","bytes"],

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;

Return values
ValueType|null

getTimeUnixNano()

Time of collection (UTC) represented as nanoseconds past the epoch.

public getTimeUnixNano() : int|string

Generated from protobuf field fixed64 time_unix_nano = 3;

Return values
int|string

hasPeriodType()

public hasPeriodType() : mixed

hasSampleType()

public hasSampleType() : mixed

setAttributeIndices()

References to attributes in attribute_table. [optional]

public setAttributeIndices(array<string|int, int>|RepeatedField $var) : $this

Generated from protobuf field repeated int32 attribute_indices = 12;

Parameters
$var : array<string|int, int>|RepeatedField
Return values
$this

setCommentStrindices()

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.

public setCommentStrindices(array<string|int, int>|RepeatedField $var) : $this

Generated from protobuf field repeated int32 comment_strindices = 7;

Parameters
$var : array<string|int, int>|RepeatedField
Return values
$this

setDroppedAttributesCount()

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.

public setDroppedAttributesCount(int $var) : $this

Generated from protobuf field uint32 dropped_attributes_count = 9;

Parameters
$var : int
Return values
$this

setDurationNano()

Duration of the profile, if a duration makes sense.

public setDurationNano(int|string $var) : $this

Generated from protobuf field uint64 duration_nano = 4;

Parameters
$var : int|string
Return values
$this

setOriginalPayload()

Original payload can be stored in this field. This can be useful for users who want to get the original payload.

public setOriginalPayload(string $var) : $this

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.

Generated from protobuf field bytes original_payload = 11;

Parameters
$var : string
Return values
$this

setOriginalPayloadFormat()

Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present]

public setOriginalPayloadFormat(string $var) : $this

Generated from protobuf field string original_payload_format = 10;

Parameters
$var : string
Return values
$this

setPeriod()

The number of events between sampled occurrences.

public setPeriod(int|string $var) : $this

Generated from protobuf field int64 period = 6;

Parameters
$var : int|string
Return values
$this

setPeriodType()

The kind of events between sampled occurrences.

public setPeriodType(ValueType $var) : $this

e.g [ "cpu","cycles" ] or [ "heap","bytes" ]

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType period_type = 5;

Parameters
$var : ValueType
Return values
$this

setProfileId()

A globally unique identifier for a profile. The ID is a 16-byte array. An ID with all zeroes is considered invalid. It may be used for deduplication and signal correlation purposes. It is acceptable to treat two profiles with different values in this field as not equal, even if they represented the same object at an earlier time.

public setProfileId(string $var) : $this

This field is optional; an ID may be assigned to an ID-less profile in a later step.

Generated from protobuf field bytes profile_id = 8;

Parameters
$var : string
Return values
$this

setSample()

The set of samples recorded in this profile.

public setSample(array<string|int, Sample>|RepeatedField $var) : $this

Generated from protobuf field repeated .opentelemetry.proto.profiles.v1development.Sample sample = 2;

Parameters
$var : array<string|int, Sample>|RepeatedField
Return values
$this

setSampleType()

The type and unit of all Sample.values in this profile.

public setSampleType(ValueType $var) : $this

For a cpu or off-cpu profile this might be: ["cpu","nanoseconds"] or ["off_cpu","nanoseconds"] For a heap profile, this might be: ["allocated_objects","count"] or ["allocated_space","bytes"],

Generated from protobuf field .opentelemetry.proto.profiles.v1development.ValueType sample_type = 1;

Parameters
$var : ValueType
Return values
$this

setTimeUnixNano()

Time of collection (UTC) represented as nanoseconds past the epoch.

public setTimeUnixNano(int|string $var) : $this

Generated from protobuf field fixed64 time_unix_nano = 3;

Parameters
$var : int|string
Return values
$this

        
On this page

Search results