Skip to content

base_observability_driver

BaseObservabilityDriver

Bases: ABC

Source code in griptape/drivers/observability/base_observability_driver.py
@define
class BaseObservabilityDriver(ABC):
    def __enter__(self) -> None:  # noqa: B027
        pass

    def __exit__(
        self,
        exc_type: Optional[type[BaseException]],
        exc_value: Optional[BaseException],
        exc_traceback: Optional[TracebackType],
    ) -> bool:
        return False

    @abstractmethod
    def observe(self, call: Observable.Call) -> Any: ...

    @abstractmethod
    def get_span_id(self) -> Optional[str]: ...

__enter__()

Source code in griptape/drivers/observability/base_observability_driver.py
def __enter__(self) -> None:  # noqa: B027
    pass

__exit__(exc_type, exc_value, exc_traceback)

Source code in griptape/drivers/observability/base_observability_driver.py
def __exit__(
    self,
    exc_type: Optional[type[BaseException]],
    exc_value: Optional[BaseException],
    exc_traceback: Optional[TracebackType],
) -> bool:
    return False

get_span_id() abstractmethod

Source code in griptape/drivers/observability/base_observability_driver.py
@abstractmethod
def get_span_id(self) -> Optional[str]: ...

observe(call) abstractmethod

Source code in griptape/drivers/observability/base_observability_driver.py
@abstractmethod
def observe(self, call: Observable.Call) -> Any: ...