Skip to main content

Module

Decorators for conditionally enabling/disabling Galileo telemetry. These decorators check the GALILEO_LOGGING_DISABLED environment variable and skip execution of telemetry operations when disabled.

galileo_logging_enabled

def galileo_logging_enabled() -> bool
Check if Galileo logging/telemetry is enabled. Returns
  • bool: True if logging is enabled (default), False if GALILEO_LOGGING_DISABLED is set.

nop_async

def nop_async(f: Callable) -> Callable
Decorator that skips execution of async functions when Galileo logging is disabled. When GALILEO_LOGGING_DISABLED is set to “true”, “1”, or “t”, the decorated function will not execute and will return None instead. Arguments
  • f (Callable): The asynchronous function to wrap.
Returns
  • Callable: A wrapped async function that checks the logging toggle before execution.

nop_sync

def nop_sync(f: Callable) -> Callable
Decorator that skips execution of sync functions when Galileo logging is disabled. When GALILEO_LOGGING_DISABLED is set to “true”, “1”, or “t”, the decorated function will not execute and will return None instead. Arguments
  • f (Callable): The synchronous function to wrap.
Returns
  • Callable: A wrapped function that checks the logging toggle before execution.