Sample
extends Message
in package
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 values or timestamps_unix_nano entry. 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. Examples of different ways of representing a sample with the total value of 10: Report of a stacktrace at 10 timestamps (consumers must assume the value is 1 for each point): values: [] timestamps_unix_nano: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Report of a stacktrace with an aggregated value without timestamps: values: [10] timestamps_unix_nano: [] Report of a stacktrace at 4 timestamps where each point records a specific value: values: [2, 2, 3, 3] timestamps_unix_nano: [1, 2, 3, 4]
Generated from protobuf message opentelemetry.proto.profiles.v1development.Sample
Table of Contents
Properties
- $link_index : mixed
- Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
- $stack_index : mixed
- Reference to stack in ProfilesDictionary.stack_table.
- $attribute_indices : mixed
- References to attributes in ProfilesDictionary.attribute_table. [optional]
- $timestamps_unix_nano : mixed
- Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
- $values : mixed
- The type and unit of each value is defined by Profile.sample_type.
Methods
- __construct() : mixed
- Constructor.
- getAttributeIndices() : RepeatedField
- References to attributes in ProfilesDictionary.attribute_table. [optional]
- getLinkIndex() : int
- Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
- getStackIndex() : int
- Reference to stack in ProfilesDictionary.stack_table.
- getTimestampsUnixNano() : RepeatedField
- Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
- getValues() : RepeatedField
- The type and unit of each value is defined by Profile.sample_type.
- setAttributeIndices() : $this
- References to attributes in ProfilesDictionary.attribute_table. [optional]
- setLinkIndex() : $this
- Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
- setStackIndex() : $this
- Reference to stack in ProfilesDictionary.stack_table.
- setTimestampsUnixNano() : $this
- Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
- setValues() : $this
- The type and unit of each value is defined by Profile.sample_type.
Properties
$link_index
Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
protected
mixed
$link_index
= 0
Generated from protobuf field int32 link_index = 4;
$stack_index
Reference to stack in ProfilesDictionary.stack_table.
protected
mixed
$stack_index
= 0
Generated from protobuf field int32 stack_index = 1;
$attribute_indices
References to attributes in ProfilesDictionary.attribute_table. [optional]
private
mixed
$attribute_indices
Generated from protobuf field repeated int32 attribute_indices = 3;
$timestamps_unix_nano
Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
private
mixed
$timestamps_unix_nano
Generated from protobuf field repeated fixed64 timestamps_unix_nano = 5;
$values
The type and unit of each value is defined by Profile.sample_type.
private
mixed
$values
Generated from protobuf field repeated int64 values = 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 int $stack_index Reference to stack in ProfilesDictionary.stack_table. @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $values The type and unit of each value is defined by Profile.sample_type. @type int[]|\Google\Protobuf\Internal\RepeatedField $attribute_indices References to attributes in ProfilesDictionary.attribute_table. [optional] @type int $link_index Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value. @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $timestamps_unix_nano Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.}
getAttributeIndices()
References to attributes in ProfilesDictionary.attribute_table. [optional]
public
getAttributeIndices() : RepeatedField
Generated from protobuf field repeated int32 attribute_indices = 3;
Return values
RepeatedFieldgetLinkIndex()
Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
public
getLinkIndex() : int
Generated from protobuf field int32 link_index = 4;
Return values
intgetStackIndex()
Reference to stack in ProfilesDictionary.stack_table.
public
getStackIndex() : int
Generated from protobuf field int32 stack_index = 1;
Return values
intgetTimestampsUnixNano()
Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
public
getTimestampsUnixNano() : RepeatedField
Generated from protobuf field repeated fixed64 timestamps_unix_nano = 5;
Return values
RepeatedFieldgetValues()
The type and unit of each value is defined by Profile.sample_type.
public
getValues() : RepeatedField
Generated from protobuf field repeated int64 values = 2;
Return values
RepeatedFieldsetAttributeIndices()
References to attributes in ProfilesDictionary.attribute_table. [optional]
public
setAttributeIndices(array<string|int, int>|RepeatedField $var) : $this
Generated from protobuf field repeated int32 attribute_indices = 3;
Parameters
- $var : array<string|int, int>|RepeatedField
Return values
$thissetLinkIndex()
Reference to link in ProfilesDictionary.link_table. [optional] It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
public
setLinkIndex(int $var) : $this
Generated from protobuf field int32 link_index = 4;
Parameters
- $var : int
Return values
$thissetStackIndex()
Reference to stack in ProfilesDictionary.stack_table.
public
setStackIndex(int $var) : $this
Generated from protobuf field int32 stack_index = 1;
Parameters
- $var : int
Return values
$thissetTimestampsUnixNano()
Timestamps associated with Sample represented in nanoseconds. These timestamps should fall within the Profile's time range.
public
setTimestampsUnixNano(array<string|int, int>|array<string|int, string>|RepeatedField $var) : $this
Generated from protobuf field repeated fixed64 timestamps_unix_nano = 5;
Parameters
- $var : array<string|int, int>|array<string|int, string>|RepeatedField
Return values
$thissetValues()
The type and unit of each value is defined by Profile.sample_type.
public
setValues(array<string|int, int>|array<string|int, string>|RepeatedField $var) : $this
Generated from protobuf field repeated int64 values = 2;
Parameters
- $var : array<string|int, int>|array<string|int, string>|RepeatedField