OpenTelemetry PHP

NumberDataPoint extends Message
in package

NumberDataPoint is a single data point in a timeseries that describes the time-varying scalar value of a metric.

Generated from protobuf message opentelemetry.proto.metrics.v1.NumberDataPoint

Table of Contents

Properties

$flags  : mixed
Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.
$start_time_unix_nano  : mixed
StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.
$time_unix_nano  : mixed
TimeUnixNano is required, see the detailed comments above Metric.
$value  : mixed
$attributes  : mixed
The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).
$exemplars  : mixed
(Optional) List of exemplars collected from measurements that were used to form the data point

Methods

__construct()  : mixed
Constructor.
getAsDouble()  : float
Generated from protobuf field <code>double as_double = 4;</code>
getAsInt()  : int|string
Generated from protobuf field <code>sfixed64 as_int = 6;</code>
getAttributes()  : RepeatedField
The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).
getExemplars()  : RepeatedField
(Optional) List of exemplars collected from measurements that were used to form the data point
getFlags()  : int
Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.
getStartTimeUnixNano()  : int|string
StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.
getTimeUnixNano()  : int|string
TimeUnixNano is required, see the detailed comments above Metric.
getValue()  : string
hasAsDouble()  : mixed
hasAsInt()  : mixed
setAsDouble()  : $this
Generated from protobuf field <code>double as_double = 4;</code>
setAsInt()  : $this
Generated from protobuf field <code>sfixed64 as_int = 6;</code>
setAttributes()  : $this
The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).
setExemplars()  : $this
(Optional) List of exemplars collected from measurements that were used to form the data point
setFlags()  : $this
Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.
setStartTimeUnixNano()  : $this
StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.
setTimeUnixNano()  : $this
TimeUnixNano is required, see the detailed comments above Metric.

Properties

$flags

Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.

protected mixed $flags = 0

Generated from protobuf field uint32 flags = 8;

$start_time_unix_nano

StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.

protected mixed $start_time_unix_nano = 0

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 start_time_unix_nano = 2;

$time_unix_nano

TimeUnixNano is required, see the detailed comments above Metric.

protected mixed $time_unix_nano = 0

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 time_unix_nano = 3;

$attributes

The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).

private mixed $attributes

Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.

Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;

$exemplars

(Optional) List of exemplars collected from measurements that were used to form the data point

private mixed $exemplars

Generated from protobuf field repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;

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\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $attributes
      The set of key/value pairs that uniquely identify the timeseries from
      where this point belongs. The list may be empty (may contain 0 elements).
      Attribute keys MUST be unique (it is not allowed to have more than one
      attribute with the same key).
      The attribute values SHOULD NOT contain empty values.
      The attribute values SHOULD NOT contain bytes values.
      The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
      double values.
      The attribute values SHOULD NOT contain kvlist values.
      The behavior of software that receives attributes containing such values can be unpredictable.
      These restrictions can change in a minor release.
      The restrictions take origin from the OpenTelemetry specification:
      https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
@type int|string $start_time_unix_nano
      StartTimeUnixNano is optional but strongly encouraged, see the
      the detailed comments above Metric.
      Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
      1970.
@type int|string $time_unix_nano
      TimeUnixNano is required, see the detailed comments above Metric.
      Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
      1970.
@type float $as_double
@type int|string $as_int
@type \Opentelemetry\Proto\Metrics\V1\Exemplar[]|\Google\Protobuf\Internal\RepeatedField $exemplars
      (Optional) List of exemplars collected from
      measurements that were used to form the data point
@type int $flags
      Flags that apply to this specific data point.  See DataPointFlags
      for the available flags and their meaning.

}

getAsDouble()

Generated from protobuf field <code>double as_double = 4;</code>

public getAsDouble() : float
Return values
float

getAsInt()

Generated from protobuf field <code>sfixed64 as_int = 6;</code>

public getAsInt() : int|string
Return values
int|string

getAttributes()

The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).

public getAttributes() : RepeatedField

Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.

Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;

Return values
RepeatedField

getExemplars()

(Optional) List of exemplars collected from measurements that were used to form the data point

public getExemplars() : RepeatedField

Generated from protobuf field repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;

Return values
RepeatedField

getFlags()

Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.

public getFlags() : int

Generated from protobuf field uint32 flags = 8;

Return values
int

getStartTimeUnixNano()

StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.

public getStartTimeUnixNano() : int|string

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 start_time_unix_nano = 2;

Return values
int|string

getTimeUnixNano()

TimeUnixNano is required, see the detailed comments above Metric.

public getTimeUnixNano() : int|string

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 time_unix_nano = 3;

Return values
int|string

setAsDouble()

Generated from protobuf field <code>double as_double = 4;</code>

public setAsDouble(float $var) : $this
Parameters
$var : float
Return values
$this

setAsInt()

Generated from protobuf field <code>sfixed64 as_int = 6;</code>

public setAsInt(int|string $var) : $this
Parameters
$var : int|string
Return values
$this

setAttributes()

The set of key/value pairs that uniquely identify the timeseries from where this point belongs. The list may be empty (may contain 0 elements).

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

Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The attribute values SHOULD NOT contain empty values. The attribute values SHOULD NOT contain bytes values. The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, double values. The attribute values SHOULD NOT contain kvlist values. The behavior of software that receives attributes containing such values can be unpredictable. These restrictions can change in a minor release. The restrictions take origin from the OpenTelemetry specification: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.

Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;

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

setExemplars()

(Optional) List of exemplars collected from measurements that were used to form the data point

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

Generated from protobuf field repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;

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

setFlags()

Flags that apply to this specific data point. See DataPointFlags for the available flags and their meaning.

public setFlags(int $var) : $this

Generated from protobuf field uint32 flags = 8;

Parameters
$var : int
Return values
$this

setStartTimeUnixNano()

StartTimeUnixNano is optional but strongly encouraged, see the the detailed comments above Metric.

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

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 start_time_unix_nano = 2;

Parameters
$var : int|string
Return values
$this

setTimeUnixNano()

TimeUnixNano is required, see the detailed comments above Metric.

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

Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.

Generated from protobuf field fixed64 time_unix_nano = 3;

Parameters
$var : int|string
Return values
$this

        
On this page

Search results