smonitor.core package#
Submodules#
smonitor.core.context module#
- class smonitor.core.context.Frame(function: 'str', module: 'str', args: 'Optional[Dict[str, Any]]'=None, time: 'str' = <factory>, tags: 'Optional[List[str]]' = None, duration_ms: 'Optional[float]' = None)[source]#
Bases:
object- Parameters:
function (str)
module (str)
args (Dict[str, Any] | None)
time (str)
tags (List[str] | None)
duration_ms (float | None)
- args: Dict[str, Any] | None = None#
- duration_ms: float | None = None#
- function: str#
- module: str#
- tags: List[str] | None = None#
- time: str#
smonitor.core.decorator module#
- smonitor.core.decorator.random() x in the interval [0, 1).#
smonitor.core.manager module#
- class smonitor.core.manager.Manager[source]#
Bases:
object- property config: ManagerConfig#
- configure(*, level=None, theme=None, capture_warnings=None, capture_logging=None, capture_exceptions=None, trace_depth=None, show_traceback=None, profile=None, handlers=None, routes=None, filters=None, args_summary=None, profiling=None, codes=None, signals=None, strict_signals=None, strict_schema=None, enabled=None, profiling_buffer_size=None, profiling_hooks=None, profiling_sample_rate=None, event_buffer_size=None, config_path=None, silence=None, handler_error_threshold=None)[source]#
- Parameters:
level (str | None)
theme (str | None)
capture_warnings (bool | None)
capture_logging (bool | None)
capture_exceptions (bool | None)
trace_depth (int | None)
show_traceback (bool | None)
profile (str | None)
handlers (Iterable[Any] | None)
routes (List[Dict[str, Any]] | None)
filters (List[Dict[str, Any]] | None)
args_summary (bool | None)
profiling (bool | None)
codes (Dict[str, Dict[str, Any]] | None)
signals (Dict[str, Dict[str, Any]] | None)
strict_signals (bool | None)
strict_schema (bool | None)
enabled (bool | None)
profiling_buffer_size (int | None)
profiling_hooks (List[Any] | None)
profiling_sample_rate (float | None)
event_buffer_size (int | None)
config_path (str | Path | None)
silence (List[str] | None)
handler_error_threshold (int | None)
- Return type:
None
- emit(level, message, *, source=None, extra=None, category=None, code=None, tags=None, exception_type=None)[source]#
- Parameters:
level (str)
message (str)
source (str | None)
extra (Dict[str, Any] | None)
category (str | None)
code (str | None)
tags (List[str] | None)
exception_type (str | None)
- Return type:
Dict[str, Any]
- class smonitor.core.manager.ManagerConfig(level: 'str' = 'WARNING', theme: 'str' = 'plain', capture_warnings: 'bool' = True, capture_logging: 'bool' = True, trace_depth: 'int' = 3, show_traceback: 'bool' = False, profile: 'str' = 'user', capture_exceptions: 'bool' = False, args_summary: 'bool' = False, profiling: 'bool' = False, strict_signals: 'bool' = False, strict_schema: 'bool' = False, enabled: 'bool' = True, profiling_buffer_size: 'int' = 1000, profiling_hooks: 'list | None' = None, profiling_sample_rate: 'float' = 1.0, event_buffer_size: 'int' = 0, silence: 'list[str]' = <factory>, handler_error_threshold: 'int' = 0)[source]#
Bases:
object- Parameters:
level (str)
theme (str)
capture_warnings (bool)
capture_logging (bool)
trace_depth (int)
show_traceback (bool)
profile (str)
capture_exceptions (bool)
args_summary (bool)
profiling (bool)
strict_signals (bool)
strict_schema (bool)
enabled (bool)
profiling_buffer_size (int)
profiling_hooks (list | None)
profiling_sample_rate (float)
event_buffer_size (int)
silence (list[str])
handler_error_threshold (int)
- args_summary: bool = False#
- capture_exceptions: bool = False#
- capture_logging: bool = True#
- capture_warnings: bool = True#
- enabled: bool = True#
- event_buffer_size: int = 0#
- handler_error_threshold: int = 0#
- level: str = 'WARNING'#
- profile: str = 'user'#
- profiling: bool = False#
- profiling_buffer_size: int = 1000#
- profiling_hooks: list | None = None#
- profiling_sample_rate: float = 1.0#
- show_traceback: bool = False#
- silence: list[str]#
- strict_schema: bool = False#
- strict_signals: bool = False#
- theme: str = 'plain'#
- trace_depth: int = 3#