viam.gen.opentelemetry.proto.common.v1.common_pb2 ================================================= .. py:module:: viam.gen.opentelemetry.proto.common.v1.common_pb2 .. autoapi-nested-parse:: @generated by mypy-protobuf. Do not edit manually! isort:skip_file Copyright 2019, OpenTelemetry Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Attributes ---------- .. autoapisummary:: viam.gen.opentelemetry.proto.common.v1.common_pb2.DESCRIPTOR viam.gen.opentelemetry.proto.common.v1.common_pb2.global___AnyValue viam.gen.opentelemetry.proto.common.v1.common_pb2.global___ArrayValue viam.gen.opentelemetry.proto.common.v1.common_pb2.global___KeyValueList viam.gen.opentelemetry.proto.common.v1.common_pb2.global___KeyValue viam.gen.opentelemetry.proto.common.v1.common_pb2.global___InstrumentationScope viam.gen.opentelemetry.proto.common.v1.common_pb2.global___EntityRef Classes ------- .. autoapisummary:: viam.gen.opentelemetry.proto.common.v1.common_pb2.AnyValue viam.gen.opentelemetry.proto.common.v1.common_pb2.ArrayValue viam.gen.opentelemetry.proto.common.v1.common_pb2.KeyValueList viam.gen.opentelemetry.proto.common.v1.common_pb2.KeyValue viam.gen.opentelemetry.proto.common.v1.common_pb2.InstrumentationScope viam.gen.opentelemetry.proto.common.v1.common_pb2.EntityRef Module Contents --------------- .. py:data:: DESCRIPTOR :type: google.protobuf.descriptor.FileDescriptor .. py:class:: AnyValue(*, string_value: str = ..., bool_value: bool = ..., int_value: int = ..., double_value: float = ..., array_value: global___ArrayValue | None = ..., kvlist_value: global___KeyValueList | None = ..., bytes_value: bytes = ...) Bases: :py:obj:`google.protobuf.message.Message` Represents any type of attribute value. AnyValue may contain a primitive value such as a string or integer or it may contain an arbitrary nested object containing arrays, key-value lists and primitives. .. py:attribute:: string_value :type: str .. py:attribute:: bool_value :type: bool .. py:attribute:: int_value :type: int .. py:attribute:: double_value :type: float .. py:attribute:: bytes_value :type: bytes .. py:property:: array_value :type: global___ArrayValue .. py:property:: kvlist_value :type: global___KeyValueList .. py:method:: HasField(field_name: Literal['array_value', b'array_value', 'bool_value', b'bool_value', 'bytes_value', b'bytes_value', 'double_value', b'double_value', 'int_value', b'int_value', 'kvlist_value', b'kvlist_value', 'string_value', b'string_value', 'value', b'value']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:method:: WhichOneof(oneof_group: Literal['value', b'value']) -> Literal['string_value', 'bool_value', 'int_value', 'double_value', 'array_value', 'kvlist_value', 'bytes_value'] | None Returns the name of the field that is set inside a oneof group. If no field is set, returns None. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:data:: global___AnyValue .. py:class:: ArrayValue(*, values: collections.abc.Iterable[global___AnyValue] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` ArrayValue is a list of AnyValue messages. We need ArrayValue as a message since oneof in AnyValue does not allow repeated fields. .. py:property:: values :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AnyValue] Array of values. The array may be empty (contain 0 elements). .. py:data:: global___ArrayValue .. py:class:: KeyValueList(*, values: collections.abc.Iterable[global___KeyValue] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` KeyValueList is a list of KeyValue messages. We need KeyValueList as a message since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches are semantically equivalent. .. py:property:: values :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___KeyValue] A collection of key/value pairs of key-value pairs. The list may be empty (may contain 0 elements). The keys MUST be unique (it is not allowed to have more than one value with the same key). The behavior of software that receives duplicated keys can be unpredictable. .. py:data:: global___KeyValueList .. py:class:: KeyValue(*, key: str = ..., value: global___AnyValue | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Represents a key-value pair that is used to store Span attributes, Link attributes, etc. .. py:attribute:: key :type: str The key name of the pair. .. py:property:: value :type: global___AnyValue The value of the pair. .. py:method:: HasField(field_name: Literal['value', b'value']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:data:: global___KeyValue .. py:class:: InstrumentationScope(*, name: str = ..., version: str = ..., attributes: collections.abc.Iterable[global___KeyValue] | None = ..., dropped_attributes_count: int = ...) Bases: :py:obj:`google.protobuf.message.Message` InstrumentationScope is a message representing the instrumentation scope information such as the fully qualified name and version. .. py:attribute:: name :type: str A name denoting the Instrumentation scope. An empty instrumentation scope name means the name is unknown. .. py:attribute:: version :type: str Defines the version of the instrumentation scope. An empty instrumentation scope version means the version is unknown. .. py:attribute:: dropped_attributes_count :type: int 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. .. py:property:: attributes :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___KeyValue] Additional attributes that describe the scope. [Optional]. Attribute keys MUST be unique (it is not allowed to have more than one attribute with the same key). The behavior of software that receives duplicated keys can be unpredictable. .. py:data:: global___InstrumentationScope .. py:class:: EntityRef(*, schema_url: str = ..., type: str = ..., id_keys: collections.abc.Iterable[str] | None = ..., description_keys: collections.abc.Iterable[str] | None = ...) Bases: :py:obj:`google.protobuf.message.Message` A reference to an Entity. Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs. Status: [Development] .. py:attribute:: schema_url :type: str The Schema URL, if known. This is the identifier of the Schema that the entity data is recorded in. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in this message and to the Resource attributes referenced by id_keys and description_keys. TODO: discuss if we are happy with this somewhat complicated definition of what the schema_url applies to. This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs. .. py:attribute:: type :type: str Defines the type of the entity. MUST not change during the lifetime of the entity. For example: "service" or "host". This field is required and MUST not be empty for valid entities. .. py:property:: id_keys :type: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str] Attribute Keys that identify the entity. MUST not change during the lifetime of the entity. The Id must contain at least one attribute. These keys MUST exist in the containing {message}.attributes. .. py:property:: description_keys :type: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str] Descriptive (non-identifying) attribute keys of the entity. MAY change over the lifetime of the entity. MAY be empty. These attribute keys are not part of entity's identity. These keys MUST exist in the containing {message}.attributes. .. py:data:: global___EntityRef