smonitor package#

Subpackages#

Submodules#

smonitor.bundle module#

smonitor.bundle.collect_bundle(*, project_config=None, include_events=True, max_events=None, since=None, drop_extra=False, drop_context=False, redact_fields=None)[source]#
Parameters:
  • project_config (Dict[str, Any] | None)

  • include_events (bool)

  • max_events (int | None)

  • since (str | None)

  • drop_extra (bool)

  • drop_context (bool)

  • redact_fields (Iterable[str] | None)

Return type:

Dict[str, Any]

smonitor.bundle.export_bundle(path, *, include_events=True, max_events=None, since=None, drop_extra=False, drop_context=False, redact_fields=None, force=False, append_events=False, config_base=None)[source]#
Parameters:
  • path (str | Path)

  • include_events (bool)

  • max_events (int | None)

  • since (str | None)

  • drop_extra (bool)

  • drop_context (bool)

  • redact_fields (Iterable[str] | None)

  • force (bool)

  • append_events (bool)

  • config_base (Path | None)

Return type:

Path

smonitor.bundle.write_bundle(path, *, project_config=None, include_events=True, max_events=None, since=None, drop_extra=False, drop_context=False, redact_fields=None, force=False, append_events=False)[source]#
Parameters:
  • path (Path)

  • project_config (Dict[str, Any] | None)

  • include_events (bool)

  • max_events (int | None)

  • since (str | None)

  • drop_extra (bool)

  • drop_context (bool)

  • redact_fields (Iterable[str] | None)

  • force (bool)

  • append_events (bool)

Return type:

Path

smonitor.catalog module#

smonitor.catalog.generate_catalog(root)[source]#
Parameters:

root (Path)

Return type:

Dict[str, str]

smonitor.catalog.write_catalog(root, out_dir)[source]#
Parameters:
  • root (Path)

  • out_dir (Path)

Return type:

None

smonitor.cli module#

smonitor.cli.main()[source]#
Return type:

int

smonitor.docs_utils module#

smonitor.docs_utils.render_codes_table(codes)[source]#
Parameters:

codes (Dict[str, dict])

Return type:

str

smonitor.docs_utils.render_signals_table(signals)[source]#
Parameters:

signals (Dict[str, dict])

Return type:

str

smonitor.profiling module#

smonitor.profiling.export_timeline(path, format='json')[source]#
Parameters:
  • path (str)

  • format (str)

Return type:

None

smonitor.profiling.span(name, **meta)[source]#
Parameters:
  • name (str)

  • meta (Any)

smonitor.validation module#

smonitor.validation.enforce_schema(event, *, strict=False)[source]#
Parameters:
  • event (Dict[str, Any])

  • strict (bool)

Return type:

List[str]

smonitor.validation.validate_event(event)[source]#
Parameters:

event (Dict[str, Any])

Return type:

List[str]

Module contents#

smonitor.collect_bundle(*, project_config=None, include_events=True, max_events=None, since=None, drop_extra=False, drop_context=False, redact_fields=None)[source]#
Parameters:
  • project_config (Dict[str, Any] | None)

  • include_events (bool)

  • max_events (int | None)

  • since (str | None)

  • drop_extra (bool)

  • drop_context (bool)

  • redact_fields (Iterable[str] | None)

Return type:

Dict[str, Any]

smonitor.configure(**kwargs)[source]#
smonitor.emit(level, message, **kwargs)[source]#
smonitor.export_bundle(path, *, include_events=True, max_events=None, since=None, drop_extra=False, drop_context=False, redact_fields=None, force=False, append_events=False, config_base=None)[source]#
Parameters:
  • path (str | Path)

  • include_events (bool)

  • max_events (int | None)

  • since (str | None)

  • drop_extra (bool)

  • drop_context (bool)

  • redact_fields (Iterable[str] | None)

  • force (bool)

  • append_events (bool)

  • config_base (Path | None)

Return type:

Path

smonitor.get_manager()[source]#
Return type:

Manager

smonitor.report()[source]#
smonitor.resolve(message=None, **kwargs)[source]#
smonitor.signal(func=None, *, tags=None, exception_level='ERROR')[source]#
Parameters:
  • func (Callable[[...], Any] | None)

  • tags (list[str] | None)

  • exception_level (str)