Skip to content

Commit

Permalink
Align AnyValue type definition with OpenTelemetry specification
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Alnosairi committed Sep 23, 2024
1 parent c5fbc9c commit 6fdb6d4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions opentelemetry-api/src/opentelemetry/util/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@
# limitations under the License.


from typing import Dict, List, Mapping, Optional, Sequence, Tuple, Union
from typing import Mapping, Optional, Sequence, Tuple, Union

# This is the implementation of the "Any" type as specified by the specifications of OpenTelemetry data model for logs.
# For more details, refer to the OTel specification:
# https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#type-any

AnyValue = Union[
str, bool, int, float, bytes, List["AnyValue"], Dict[str, "AnyValue"], None
str,
bool,
int,
float,
bytes,
Sequence["AnyValue"],
Mapping[str, "AnyValue"],
None,
]
AttributeValue = Union[
str,
Expand Down

0 comments on commit 6fdb6d4

Please sign in to comment.