OpenTelemetry PHP

Resource extends Message
in package

Resource information.

Generated from protobuf message opentelemetry.proto.resource.v1.Resource

Table of Contents

Properties

$dropped_attributes_count  : mixed
dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.
$attributes  : mixed
Set of attributes that describe the resource.
$entity_refs  : mixed
Set of entities that participate in this Resource.

Methods

__construct()  : mixed
Constructor.
getAttributes()  : RepeatedField
Set of attributes that describe the resource.
getDroppedAttributesCount()  : int
dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.
getEntityRefs()  : RepeatedField
Set of entities that participate in this Resource.
setAttributes()  : $this
Set of attributes that describe the resource.
setDroppedAttributesCount()  : $this
dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.
setEntityRefs()  : $this
Set of entities that participate in this Resource.

Properties

$dropped_attributes_count

dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.

protected mixed $dropped_attributes_count = 0

Generated from protobuf field uint32 dropped_attributes_count = 2;

$attributes

Set of attributes that describe the resource.

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 = 1;

$entity_refs

Set of entities that participate in this Resource.

private mixed $entity_refs

Note: keys in the references MUST exist in attributes of this message. Status: [Development]

Generated from protobuf field repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3;

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
      Set of attributes that describe the resource.
      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 $dropped_attributes_count
      dropped_attributes_count is the number of dropped attributes. If the value is 0, then
      no attributes were dropped.
@type \Opentelemetry\Proto\Common\V1\EntityRef[]|\Google\Protobuf\Internal\RepeatedField $entity_refs
      Set of entities that participate in this Resource.
      Note: keys in the references MUST exist in attributes of this message.
      Status: [Development]

}

getAttributes()

Set of attributes that describe the resource.

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 = 1;

Return values
RepeatedField

getDroppedAttributesCount()

dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.

public getDroppedAttributesCount() : int

Generated from protobuf field uint32 dropped_attributes_count = 2;

Return values
int

getEntityRefs()

Set of entities that participate in this Resource.

public getEntityRefs() : RepeatedField

Note: keys in the references MUST exist in attributes of this message. Status: [Development]

Generated from protobuf field repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3;

Return values
RepeatedField

setAttributes()

Set of attributes that describe the resource.

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 = 1;

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

setDroppedAttributesCount()

dropped_attributes_count is the number of dropped attributes. If the value is 0, then no attributes were dropped.

public setDroppedAttributesCount(int $var) : $this

Generated from protobuf field uint32 dropped_attributes_count = 2;

Parameters
$var : int
Return values
$this

setEntityRefs()

Set of entities that participate in this Resource.

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

Note: keys in the references MUST exist in attributes of this message. Status: [Development]

Generated from protobuf field repeated .opentelemetry.proto.common.v1.EntityRef entity_refs = 3;

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

        
On this page

Search results