Skip to content

Commit

Permalink
Add more restrictive custom Any type to LogRecord body field
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Alnosairi committed Sep 12, 2024
1 parent a8aacb0 commit 48413a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import warnings
from os import environ
from time import time_ns
from typing import Any, Callable, Optional, Tuple, Union # noqa
from typing import Callable, Dict, List, Optional, Tuple, Union # noqa

from opentelemetry._logs import Logger as APILogger
from opentelemetry._logs import LoggerProvider as APILoggerProvider
Expand Down Expand Up @@ -69,6 +69,8 @@ class LogDroppedAttributesWarning(UserWarning):

warnings.simplefilter("once", LogDroppedAttributesWarning)

Any = Union[str, bool, int, float, bytes, List["Any"], Dict[str, "Any"], None]


class LogLimits:
"""This class is based on a SpanLimits class in the Tracing module.
Expand Down

0 comments on commit 48413a2

Please sign in to comment.