diff --git a/opentelemetry-api/src/opentelemetry/attributes/__init__.py b/opentelemetry-api/src/opentelemetry/attributes/__init__.py index ab8590cc602..497952984db 100644 --- a/opentelemetry-api/src/opentelemetry/attributes/__init__.py +++ b/opentelemetry-api/src/opentelemetry/attributes/__init__.py @@ -16,7 +16,7 @@ import threading from collections import OrderedDict from collections.abc import MutableMapping -from typing import Optional, Sequence, Union +from typing import Optional, Sequence, Tuple, Union from opentelemetry.util import types @@ -30,7 +30,7 @@ def _clean_attribute( key: str, value: types.AttributeValue, max_len: Optional[int] -) -> Optional[Union[types.AttributeValue, tuple[Union[str, int, float], ...]]]: +) -> Optional[Union[types.AttributeValue, Tuple[Union[str, int, float], ...]]]: """Checks if attribute value is valid and cleans it if required. The function returns the cleaned value or None if the value is not valid.